Repository navigation
Reply 400 or 404 to a system or group detail page without a valid ID - #59
Merged
Merged
Conversation
/system-detail and /group-detail replied 500 and logged an EJBException when their ID parameter was missing, empty or not a number, since the null ID went straight to EntityManager.find (or ParamConverter threw NumberFormatException). An ID that matched nothing rendered an empty page with a 200. Reply 400 for a missing, empty or non-number ID, and 404 when no system or group has the ID, through the app's error page. PagesIT checks both pages for each case. Fixes #51 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #51
What changed
/system-detailand/group-detailreplied 500 (and loggedEJBException: IllegalArgumentException: id to load is required for loading) when their ID was missing or empty, and the same for a non-number ID (NumberFormatExceptioninParamConverter). An ID that matched nothing rendered an empty page with a 200.SystemDetailandGroupDetailnow reply, through the app's/errorpage:abc999999)PagesITgetsdetailPageRejectsMissingOrUnknownId, covering those eight URLs.No schema or settings changes, so there are no upgrade steps.
Checks
./gradlew build(compile + spotlessCheck): passed.PagesITcases against the unfixed app: all 8 failed (500 and 200, as above)../gradlew integrationTestpassed in full (all 41PagesITcases, plusMaskingRequestIT,ReadinessITandStatusReportsIT).MaskingRequestIT's existing access-denied checks.group-detail?groupId=999999shows the error page with "404: Not Found", andsystem-detail?systemId=141still renders as before.builddoesn't run the integration tests; they need the running stack.Decisions
Checklists, which catchesParamConverter's exception and replies 400.sendErrorhas no message: the app's error page shows only the status, so the other servlets don't pass one either.Prepared-by: Anthropic Claude Code:claude-opus-5-5
🤖 Generated with Claude Code