CDA-115: Exception wrapping improvement#1775
Open
zack-rma wants to merge 2 commits into
Open
Conversation
…Included integration test for location groups.
MikeNeilson
requested changes
Jun 10, 2026
| .assertThat() | ||
| .statusCode(is(HttpServletResponse.SC_BAD_REQUEST)) | ||
| .body("message", equalTo("Bad Request")) | ||
| .body("details.message", equalTo("ORA-20998: ERROR: Alias (AliasedId) would reference multiple locations. " + |
Contributor
There was a problem hiding this comment.
Strip the "ORA-XXXX:" part out of the detail message. The context is fine, but the security people get all "wiggy" when hints of database implementations are present... even when it's already rather well known like for, you know, this project.
Collaborator
Author
There was a problem hiding this comment.
Dropped error code
| String[] parts = localizedMessage.split("\n"); | ||
| String errorMessage = parts[0]; | ||
| Map<String, String> errorDetails = new HashMap<>(); | ||
| errorDetails.put("message", errorMessage); |
Contributor
There was a problem hiding this comment.
Message details need to be put through the sanitizer. The input is from the user so we assume it fail because it was an attack.... even if 98% of the time it's just a typo.
Collaborator
Author
There was a problem hiding this comment.
Passed message through sanitizer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated JooqDao to wrap all DB exceptions in range 20,000 to 20,999. Included integration test for location groups.
Related Issue
Closes #1695
Validation
Integration test included.
Checklist