Skip to content

fix: return 400 instead of 404 in leaveShow when no active show#173

Open
jakebromberg wants to merge 3 commits intomainfrom
fix/28-leaveshow-status
Open

fix: return 400 instead of 404 in leaveShow when no active show#173
jakebromberg wants to merge 3 commits intomainfrom
fix/28-leaveshow-status

Conversation

@jakebromberg
Copy link
Member

@jakebromberg jakebromberg commented Feb 21, 2026

Summary

  • Fixed leaveShow returning 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.
  • Added unit test covering the leaveShow no-active-show branch to prevent regression.

Fixes #28

Test plan

  • New unit test flowsheet.leaveShow.test.ts asserts 400 status when getLatestShow returns a show with end_time set
  • Test fails against the old code (404), passes against the fix (400)
  • Existing unit test suite still passes (npm run test:unit)

Made with Cursor

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>
@jakebromberg jakebromberg force-pushed the fix/28-leaveshow-status branch from b9a3c91 to 804fde2 Compare February 27, 2026 05:55
Jake Bromberg 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.
@jakebromberg jakebromberg force-pushed the fix/28-leaveshow-status branch from 4749f1f to a9638e3 Compare February 27, 2026 22:29
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.

1 participant