Skip to content

Handle malformed JSON request bodies#7

Open
phucnguyen1707 wants to merge 1 commit into
profullstack:masterfrom
phucnguyen1707:handle-invalid-json-bodies
Open

Handle malformed JSON request bodies#7
phucnguyen1707 wants to merge 1 commit into
profullstack:masterfrom
phucnguyen1707:handle-invalid-json-bodies

Conversation

@phucnguyen1707

Copy link
Copy Markdown

Fixes #6.

Summary

  • Return HTTP 400 for malformed JSON request bodies instead of falling through to the 500 handler
  • Keep the generic 500 handler for unexpected server errors
  • Add a CommandBoard API contract regression test for malformed JSON submitted to /api/tasks

Tests

  • npm --workspace @logicsrc/commandboard-api run test:contract
  • npm run build

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.

CommandBoard API returns 500 for malformed JSON bodies

1 participant