Error Handling
The TeeTime API uses standard HTTP status codes and returns consistent error responses.
Error Response Format
{
"error": {
"code": "BOOKING_NOT_FOUND",
"message": "The requested booking does not exist",
"details": {}
}
}
Common Error Codes
| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Request body or parameters are invalid |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | API key lacks required permissions |
| 404 | NOT_FOUND | Resource not found |
| 409 | CONFLICT | Resource conflict (e.g., double booking) |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |
Retry Strategy
For 429 and 5xx errors, implement exponential backoff with jitter.