-
Notifications
You must be signed in to change notification settings - Fork 0
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
GRAD2-2768 #348
GRAD2-2768 #348
Conversation
…script eligibility
# Conflicts: # api/src/main/java/ca/bc/gov/educ/api/trax/service/SchoolEventBaseService.java
protected ResponseEntity<Object> handleEntityNotFound(RuntimeException ex, WebRequest request) { | ||
LOGGER.error("JPA ERROR IS: " + ex.getClass().getName(), ex); | ||
protected ResponseEntity<Object> handleEntityNotFound(RuntimeException ex) { | ||
log.error("JPA ERROR IS: {}", ex.getClass().getName(), ex); | ||
validation.clear(); | ||
return new ResponseEntity<>(ApiResponseModel.ERROR(null, ex.getLocalizedMessage()), HttpStatus.BAD_REQUEST); | ||
} |
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.
This is the second EntityNotFound handler, but covers DataRetrievalFailure.
Also DataRetrievalFailure is more related to the server side 500 group of errors and returning of BAD_REQUEST is confusing.
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.
Agree. I merged the two and return a 404. The EntityNotFoundException is the only one explicitly thrown to state that an object is not found in the DB, while the other exceptions are from Spring JPA but also denote not found.
Quality Gate failedFailed conditions |
This reverts commit 6a6bea1.
This reverts commit e304bb7.
* Adding bruno files * Increased meta space to help mitigate OOMKills * Revert "Revert "GRAD2-2768 (#348)"" This reverts commit e304bb7. * Fixing configmap. * Updating metaspace. --------- Co-authored-by: chris.ditcher <[email protected]>
No description provided.