-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: correct matrix error output #1970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my inline comment. Cheers! 🤟
ors-engine/src/main/java/org/heigit/ors/matrix/MatrixRequest.java
Outdated
Show resolved
Hide resolved
|
@@ -224,9 +222,9 @@ else if (getSearchParameters().getDynamicSpeeds() && routingProfile.getGraphhopp | |||
} catch (PointNotFoundException e) { | |||
throw e; | |||
} catch (MaxVisitedNodesExceededException e) { | |||
throw new InternalServerException(MatrixErrorCodes.MAX_VISITED_NODES_EXCEEDED, "Unable to compute a distance/duration matrix: " + e.getMessage()); | |||
throw new StatusCodeException(500, MatrixErrorCodes.MAX_VISITED_NODES_EXCEEDED, "Unable to compute a distance/duration matrix: " + e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I missing something here, or is this just a refactoring? According to
openrouteservice/ors-engine/src/main/java/org/heigit/ors/exceptions/InternalServerException.java
Lines 29 to 31 in 6cf11db
public InternalServerException(int errorCode, String message) { | |
super(StatusCode.INTERNAL_SERVER_ERROR, errorCode, message); | |
} |
a call to StatusCodeException(500, MatrixErrorCodes.MAX_VISITED_NODES_EXCEEDED, "...")
is effectively the same as InternalServerException(MatrixErrorCodes.MAX_VISITED_NODES_EXCEEDED, "...")
.
Pull Request Checklist
have been resolved.
[Unreleased] heading.
along with a short description of what it is for, and documented this in the Pull Request (below).
(at least Germany), and the graphs build without problems (i.e. no out-of-memory errors).
importer etc.), I have generated longer distance routes for the affected profiles with different options
(avoid features, max weight etc.) and compared these with the routes of the same parameters and start/end
points generated from the current live ORS.
If there are differences then the reasoning for these MUST be documented in the pull request.
and why the change was needed.
Information about the changes
Some error responses of the matrix endpoint were not formed correctly using the internal error codes.