Repository navigation
Reject a deploy request without a version - #22
Merged
Merged
Conversation
A request without the ver parameter passed a null version to validateSemver, where Pattern.matcher(null) threw a NullPointerException. The deploy servlet then failed with an error page instead of its JSON response. Treat a missing version like any other non-semver version, so the caller gets "Version string must be semver formatted". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slominskir
approved these changes
Oct 1, 2026
Merged
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.
Found while writing the tests in #21.
What changed
A deploy request without the
verparameter passed a null version toDeployerFacade.validateSemver, wherePattern.matcher(null)threw aNullPointerException. TheDeployservlet catches onlyUserFriendlyExceptionandIOException, so the caller got an error page instead of the JSON response. Now a missing version is rejected like any other non-semver version, with{"exception": "Version string must be semver formatted"}.DeployerFacadeTest.nonSemverIsRejectednow also covers a null version.Checks
NullPointerException../gradlew spotlessCheck buildpasses (33 tests, in thegradle:9-jdk21container).Not checked: requests without
envorapp. Those go toAppEnvFacade.findas null names. I'd expect the query to find nothing and return "AppEnv not found", but that needs the database to confirm.🤖 Generated with Claude Code