Return 400 for malformed JSON and 413 for oversized bodies
Sending invalid JSON to POST /api/signup crashes into a 500 Internal Server Error, and there is no limit on body size. Client mistakes should get proper 4xx answers.
What you'll learn
Correct HTTP status codes and defensive request parsing
Acceptance criteria
Malformed JSON returns 400 with { error: "Invalid JSON" }
Request bodies larger than 10 KB return 413 without reading the whole body into memory
Real server errors still return 500
Tests cover malformed JSON, an oversized body and a normal request
Contribution rules
Work on a branch named task-3-…
Your PR description must include Closes #3
Open the PR from the GitHub account you signed in with