How to complete the challenge POST /api/todos (422) description too long

Issue a POST request to /api/todos with a description longer than the maximum allowed length.

The response should be 422 Unprocessable Content and include a validation error explaining that the description exceeded the maximum length.

Keep the JSON syntax valid; the point of the challenge is entity validation, not malformed JSON.

Try it now

POST /api/todos with a long description to trigger 422

Lessons Learned

  • A readable JSON body can still fail when description exceeds its field limit.
  • Field-specific validation should point to the oversized description, not a generic parse problem.
  • This boundary differs from the whole-request 413 Content Too Large size limit.

Suggested Experiments

  • Send 200 description characters, then 201, and compare success with 422 Unprocessable Content.
  • Keep description invalid while changing title to prove the reported error stays focused.
Experiment with this endpoint