Foreign key constraint violations (PostgreSQL error 23503) from user input (e.g., POST /rest/people with a non-existent companyId) were falling through to the generic PostgresException catch-all, which returned a 500 Internal Server Error with an unhelpful "Data validation error." message. Add a specific handler for FOREIGN_KEY_VIOLATION that returns a TwentyORMException with INVALID_INPUT code, resulting in a 400 Bad Request with a descriptive message. Co-Authored-By: Claude Opus 4.6 <[email protected]>