Error Handling
Learn how to handle errors returned by the EdgeDNS API.
Error Response Format
All error responses follow a consistent JSON format:
{
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or expired.",
"details": { }
},
"request_id": "req_abc123"
}The details object is optional and provides additional context for specific error types (e.g., the required tier for a TIER_RESTRICTION error).
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - request completed successfully |
| 400 | Bad Request - invalid parameters or domain format |
| 401 | Unauthorized - invalid, expired, or missing API key |
| 402 | Payment Required - subscription payment needed |
| 403 | Forbidden - insufficient permissions or tier restriction |
| 404 | Not Found - resource does not exist |
| 429 | Too Many Requests - rate limit or quota exceeded |
| 500 | Internal Server Error - something went wrong |
| 502 | Bad Gateway - upstream service returned an invalid response |
| 503 | Service Unavailable - temporary outage or circuit breaker open |
| 504 | Gateway Timeout - upstream service did not respond in time |
Error Codes
Authentication (401)
AUTHENTICATION_REQUIRED- No API key provided in the requestINVALID_API_KEY- The API key format is invalid or the key does not existAPI_KEY_EXPIRED- The API key has passed its expiration dateAPI_KEY_REVOKED- The API key has been revoked
Authorization (403)
TIER_RESTRICTION- Endpoint requires a higher tier than your current planIP_NOT_ALLOWED- Request IP is not in the key's allowlistSUBSCRIPTION_INACTIVE- Your subscription is expired or canceled
Validation (400)
VALIDATION_ERROR- Input validation failed (check details for specifics)MISSING_PARAMETER- A required parameter was not providedINVALID_DOMAIN- The domain format is invalidINVALID_IP- The IP address format is invalid
Rate Limiting (429)
RATE_LIMIT_EXCEEDED- Too many requests in the current window. CheckRetry-Afterheader.QUOTA_EXCEEDED- Monthly quota for this endpoint has been reached
Server Errors (500-504)
EXTERNAL_SERVICE_ERROR- An upstream service (DNS resolver, RDAP, etc.) returned an errorTIMEOUT- An upstream service did not respond in timeCIRCUIT_OPEN- Service temporarily unavailable due to repeated upstream failuresINTERNAL_ERROR- Unexpected server error. Contact support if persistent.
Need Help?
If you are encountering unexpected errors, check the API status page or contact support.