fix: return 400 instead of 404 in leaveShow when no active show#173
Open
jakebromberg wants to merge 3 commits intomainfrom
Open
fix: return 400 instead of 404 in leaveShow when no active show#173jakebromberg wants to merge 3 commits intomainfrom
jakebromberg wants to merge 3 commits intomainfrom
Conversation
404 Not Found was semantically incorrect for this case. The resource exists but is in an invalid state, which is a 400 Bad Request. Co-authored-by: Cursor <cursoragent@cursor.com>
b9a3c91 to
804fde2
Compare
added 2 commits
February 27, 2026 10:32
The leaveShow controller now returns 400 Bad Request instead of 404 Not Found when there is no active show session. Update both "No Active Show Session" test cases in the integration tests accordingly.
4749f1f to
a9638e3
Compare
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
leaveShowreturning HTTP 404 when no active show session exists. The response message said "Bad Request" but the status code was 404 (Not Found), which is semantically incorrect. Changed to 400 (Bad Request) to match the message.leaveShowno-active-show branch to prevent regression.Fixes #28
Test plan
flowsheet.leaveShow.test.tsasserts 400 status whengetLatestShowreturns a show withend_timesetnpm run test:unit)Made with Cursor