Errors
Docyard uses standard HTTP status codes and returns structured error responses.Error Response Format
All errors follow this structure:| Field | Description | Example |
|---|---|---|
error | Machine-readable error code | validation_error |
message | Human-readable description | ”The policy_number field is required” |
details | Additional context (when applicable) | { "field": "policy_number" } |
request_id | Unique request identifier | req-abc123xyz |
HTTP Status Codes
| Status Code | Meaning |
|---|---|
200 | Success |
201 | Created |
204 | No Content |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
409 | Conflict |
422 | Validation Error |
429 | Rate Limited |
500 | Internal Server Error |
Authentication Errors
authentication_required
Status: 401
X-API-Key and X-API-Secret headers.
invalid_api_key
Status: 401
invalid_api_secret
Status: 401
api_key_expired
Status: 401
Validation Errors
validation_error
Status: 422
invalid_data_type
Status: 422
invalid_format
Status: 422
Access Errors
access_denied
Status: 403
insufficient_score
Status: 403
unauthorized_lock_type
Status: 403
Resource Errors
not_found
Status: 404
template_not_found
Status: 404
artifact_revoked
Status: 410
Rate Limiting
rate_limit_exceeded
Status: 429
Server Errors
internal_error
Status: 500
request_id.
service_unavailable
Status: 503
Error Handling Best Practices
1. Always Check Status Codes
2. Log Request IDs
Always includerequest_id when contacting support:
3. Implement Retry Logic
For transient errors:4. Handle Validation Errors Gracefully
Contacting Support
When contacting support, always include:- Request ID: Found in every error response
- Endpoint: The API endpoint you were calling
- Timestamp: When the error occurred
- Request payload: (Remove sensitive data)
Next Steps
- Authentication - API authentication
- API Reference - Full API documentation