- Add maxBodyBytes constant (1 << 20 = 1 MB) - Add errors import to production file - Apply http.MaxBytesReader + errors.As(err, *http.MaxBytesError) pattern in: WebhookHandler, TagsHandler POST, TagAssignmentHandler PUT and DELETE - Return HTTP 413 RequestEntityTooLarge when body exceeds limit - Fix oversized body test strategy: use JSON prefix so decoder reads past limit (Rule 1 deviation: all-x body fails at byte 1 before MaxBytesReader triggers)
21 KiB
21 KiB