Error response structure
All error responses share the following fields:
Example error response:
HTTP status codes
Application-specific exceptions
The following exceptions are thrown by the Chrono application and map to specific HTTP status codes.ResourceNotFoundException — 404
Thrown when a requested record cannot be found by its identifier. The detail field follows the pattern:
DuplicateEmailException — 409
Thrown when you attempt to register a license or user with an email address that is already in use. The detail field follows the pattern:
DuplicateSlugException — 409
Thrown when a resource is created with a slug that is already taken by another object of the same type. The detail field follows the pattern:
DuplicateSimulatorCarException — 409
Thrown when you try to link a car to a simulator that already has that car associated with it. The detail field follows the pattern:
DuplicateSimulatorLayoutException — 409
Thrown when you try to link a track layout to a simulator that already has that layout associated. The detail field follows the pattern:
Handling 400 validation errors
When the request body fails validation, the API returns a400 Bad Request with an additional errors property containing field-level details.
The
errors map contains one entry per invalid field. Each key is the field name and each value is the constraint violation message. Fix all reported fields before retrying the request.Handling 401 and 403 errors
A401 Unauthorized response means the API could not identify you — either the X-API-Key header is missing entirely or the key has been revoked. A 403 Forbidden response means the key is valid, but the role associated with it does not permit the operation you attempted.
Handling 500 errors
A500 Internal Server Error indicates an unexpected condition on the server. The detail field will contain:
instance path and the request body when contacting support.