Error Handling
Gigantics API endpoints return standard HTTP status codes and JSON error messages to help clients diagnose and handle issues.
HTTP Status Codes
| Status | Meaning | When It Occurs |
|---|---|---|
200 OK | Success | Request completed successfully |
403 Forbidden | Authentication/Authorization failed | Missing, invalid, or inactive API key; unknown endpoint |
404 Not Found | Resource not found | Dataset, pipeline, or job ID doesn't exist |
405 Method Not Allowed | Wrong HTTP method | Using GET on pipeline endpoint or POST on dataset endpoint |
500 Internal Server Error | Server error | Unexpected server-side exception |
Error Response Format
All error responses follow this simple JSON format:
The message field contains a human-readable description of what went wrong.
Common Error Scenarios
Missing API Key
Request:
Response:
Status: 403 Forbidden
Resolution: Include the API key via query parameter (?api_key=...) or Authorization header (Authorization: Bearer ...)
Invalid API Key
Request:
Response:
Status: 403 Forbidden
Resolution: Verify the API key is correct and assigned to the endpoint
Inactive API Key
Response:
Status: 403 Forbidden
Resolution: Activate the key in the UI or use a different active key
Unknown Endpoint
Response:
Status: 403 Forbidden
Resolution: Verify the endpoint URI is correct and that an endpoint has been assigned to the resource
Resource Not Found
Request:
Response:
Status: 404 Not Found
Resolution: Verify the dataset/pipeline ID exists and the URI path is correct
Wrong HTTP Method
Request:
Response:
Status: 405 Method Not Allowed
Resolution: Use GET for dataset endpoints, POST for pipeline endpoints
Invalid Format Parameter
Request:
Response:
Status: 500 Internal Server Error
Resolution: Use a valid format: sql, json, csv-zip, json-zip, or oracle-loader
Server Error
Response:
Status: 500 Internal Server Error
Resolution: Check the error message for details. Retry with exponential backoff. If persistent, contact support.
Job Status Endpoint Errors
The job status endpoint (/api/job/:jobId) is publicly accessible (no authentication required) and returns:
Invalid Job ID
Response:
Status: 404 Not Found
Job Not Found
Response:
Status: 404 Not Found
Dataset Not Available (for dump jobs)
Response:
Status: 404 Not Found
Error Handling Best Practices
Retry Logic
-
Do retry:
500 Internal Server Error- Temporary server issues- Network timeouts
-
Do NOT retry:
403 Forbidden- Authentication issues won't resolve by retrying404 Not Found- Resource doesn't exist405 Method Not Allowed- Wrong method won't change
-
Conditional retry:
- Check job status before retrying pipeline endpoints to avoid duplicate executions
Exponential Backoff
When retrying, use exponential backoff:
Logging
Log errors with context:
- Request URL
- Status code
- Error message
- Timestamp
- API key prefix (not full key)
Monitoring
Monitor for:
- Sudden increases in 403 errors (possible key compromise)
- Patterns of 404 errors (configuration issues)
- Frequent 500 errors (server issues)
Related Documentation
- API Endpoint Assignment - Learn how endpoints work
- Authentication - Understand API key authentication
- Multiple API Keys per Endpoint - Learn about key management