Found on the live server (3 MB JSON to /api/auth/login answered 500). Django raises RequestDataTooBig for bodies over DATA_UPLOAD_MAX_MEMORY_SIZE and would answer 400, but our DRF exception handler turned every unknown exception into 500 + logger.exception, so each large request also wrote a full ERROR traceback. Other SuspiciousOperation subclasses now get Django's 400 as well. Tested: 2 tests (the 413 one fails without the change). Verified on the server after deploy. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.3 KiB
2.3 KiB