Error Handling
All API errors return consistent JSON format with HTTP status codes.
Error Format
{
"code": "ERROR_CODE",
"message": "Human readable description",
"request_id": "req_123456789",
"hint": "Actionable suggestion"
}
Common Error Codes
400 Bad Request
INVALID_PORT_CODE: Port code format invalidINVALID_DATE_RANGE: Date parameters out of rangeINVALID_FORMAT: Unsupported format parameter
401 Unauthorized
MISSING_API_KEY: X-API-Key header requiredINVALID_API_KEY: API key not found or expired
404 Not Found
PORT_NOT_FOUND: Requested port not in coverageENDPOINT_NOT_FOUND: Invalid API endpoint
429 Too Many Requests
RATE_LIMIT_EXCEEDED: API rate limit exceeded
500 Internal Server Error
INTERNAL_ERROR: Unexpected server errorDATA_UNAVAILABLE: Temporary data source issue