Stop rejecting request fields the DTO does not have

FixSecurityService
Shipped
August 15, 2026 at 6:20 PM UTC
Author
Kamo
Commit
60aff82

Declaring an ObjectMapper bean takes binding away from Spring Boot's auto-configured one, and a hand-built mapper carries Jackson's defaults rather than Boot's. The one that mattered is FAIL_ON_UNKNOWN_PROPERTIES, which Boot turns off and this mapper left on -- so a body naming a field the target DTO lacks was rejected whole, before the handler ran, and the caller got Spring's own error page. That page reads "Bad Request" and names neither the field nor the endpoint. Editing a department in the settings UI hit exactly this. Departments moved from a free-text email to a mailboxId pointer in 8e73db6 and the field was dropped from both request DTOs; the UI kept sending it deliberately, as a bridge for services built before the pointer existed, on the assumption that an ignored field is harmless. It was not, and every department save had been failing since. Every client of this service ships on its own cadence, so at any moment some caller is sending a shape this build has moved past. That is a field to ignore, not a reason to refuse the request.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing