leonardcser opened a new pull request, #638:
URL: https://github.com/apache/incubator-baremaps/pull/638

   ## Bug
   
   When making a `GET` request to an url that does not exist, we get a 500 
error with a NullPointerException on the server.
   This is because `getClass().getClassLoader().getResourceAsStream(path)` 
returns null if the path is not found which then throws the 
NullPointerException here:
   
   ```java
   var bytes = inputStream.readAllBytes();
   ```
   
   ## Solution
   
   Add a catch for a NullPointerException, and return a 404.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to