Skip to content
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

Merged
merged 33 commits into from
Sep 10, 2024
Merged

GRAD2-2768 #348

merged 33 commits into from
Sep 10, 2024

Conversation

cditcher
Copy link
Contributor

No description provided.

chris.ditcher added 30 commits August 15, 2024 09:33
# 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);
}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link

sonarcloud bot commented Sep 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

@cditcher cditcher merged commit 6a6bea1 into grad-release Sep 10, 2024
4 of 5 checks passed
@cditcher cditcher deleted the GRAD2-2768 branch September 10, 2024 15:27
cditcher pushed a commit that referenced this pull request Sep 10, 2024
This reverts commit 6a6bea1.
cditcher pushed a commit that referenced this pull request Sep 20, 2024
cditcher added a commit that referenced this pull request Oct 3, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants