Errors
The API uses standard HTTP status codes and RFC 7807 Problem Details for error responses.
Error Format #
All error responses follow the RFC 7807 Problem Details format with Content-Type: application/problem+json:
json
{
"status": 400,
"title": "Bad Request",
"detail": "The FirstName field is required."
} Status Codes #
The API uses the following HTTP status codes:
| Status | Description |
|---|---|
| 200 OK | Request succeeded |
| 201 Created | Resource created successfully |
| 204 No Content | Request succeeded, no content returned (e.g. delete) |
| 400 Bad Request | Invalid request — missing or invalid parameters |
| 401 Unauthorized | Authentication failed — missing or invalid API key |
| 403 Forbidden | Forbidden — the API key does not have permission for this action |
| 404 Not Found | Resource not found |
| 409 Conflict | Conflict — the request conflicts with existing data |
| 429 Too Many Requests | Rate limit exceeded |
| 500 Internal Server Error | Internal server error |
Error Examples #
Validation Error (400)
json
{
"status": 400,
"title": "Bad Request",
"detail": "The FirstName field is required."
} Not Found (404)
json
{
"status": 404,
"title": "Not Found",
"detail": "Firefighter with ID '3fa85f64-5717-4562-b3fc-2c963f66afa6' was not found."
} Conflict (409)
json
{
"status": 409,
"title": "Conflict",
"detail": "A firefighter with this email already exists."
}