-
Notifications
You must be signed in to change notification settings - Fork 22
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
Default Errors doesn't support 501 status codes #34
Comments
@fieldju thanks for the report. We can look at adding some more status codes to the list and trying to find reasonable spots for where they should go in the priority order. We may even decide this kind of situation isn't something that should fail-fast - maybe we should just silently put any unspecified status codes as having lowest priority order? In the meantime, you can easily work around this by overriding the @Override
public List<Integer> getStatusCodePriorityOrder() {
// Make a copy of the DEFAULT_STATUS_CODE_PRIORITY_ORDER list.
List<Integer> statusCodePriorityOrder = new ArrayList<>(DEFAULT_STATUS_CODE_PRIORITY_ORDER);
// TODO: Put 501 wherever it should go based on what priority you want it to have. For now we'll put it at the end.
statusCodePriorityOrder.add(501);
return statusCodePriorityOrder;
} Please read the javadocs for |
This list here https://github.com/Nike-Inc/backstopper/blob/master/backstopper-core/src/main/java/com/nike/backstopper/apierror/projectspecificinfo/ProjectApiErrors.java#L233 doesn't have 501 NOT_IMPLEMENTED in the list.
This stops us from created new new error here: https://github.com/Nike-Inc/cerberus-management-service/blob/master/src/main/java/com/nike/cerberus/error/DefaultApiError.java#L310
We want to add a new error along the lines of this
The text was updated successfully, but these errors were encountered: