graphhopper / map-matching

The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
https://www.graphhopper.com/open-source/
Apache License 2.0
785 stars 274 forks source link

http code should be 400 for IllegalArgumentException:s #119

Closed karussell closed 6 years ago

karussell commented 6 years ago

In MapMatching.computeViterbiSequence(MapMatching.java:403) an IllegalArgumentException is thrown with http code 500 but it should be 400

And the message shouldn't be "There was an error processing your request. It has been logged (ID xy)" but use the illegal arg exception message in this case (?)

karussell commented 6 years ago

Such a mapper is implemented even in the docs https://www.dropwizard.io/1.1.0/docs/manual/core.html#error-handling so I should be able to easily implement this :)

Update: fixed via https://github.com/graphhopper/graphhopper/pull/1407