Errors and Retries
Understand Pullbay API error codes, HTTP status codes, and how to implement robust retry logic.
Error Response Format
All Pullbay API errors follow a consistent JSON envelope:
{
"requestId": "3b8dcb68-1f8c-4a7b-b9e7-63a7b9986f24",
"status": 400,
"message": "Validation failed",
"success": false,
"error": { "code": "VALIDATION_ERROR" }
}requestId
string
Unique identifier for this request. Save this for debugging and support.
status
integer
HTTP status code mirrored in the body
message
string
Human-readable description of what went wrong
success
boolean
Always false for errors
error.code
string
Machine-readable error code for programmatic handling
The requestId is also returned as the X-Request-Id response header.
Always include requestId when contacting Pullbay support — it allows the support team to instantly locate your request in the logs.
HTTP Status Codes Reference
200
OK
N/A
Request successful
Process the response data
400
Bad Request
No
Invalid parameters or format
Fix your request and resubmit
401
Unauthorized
No
Invalid or missing API key
Verify your API key
402
Payment Required
No
Insufficient credits
Add credits in your dashboard
403
Forbidden
No
API key lacks permission
Use a key with the right permissions
404
Not Found
No
Endpoint or resource not found
Check the endpoint URL
429
Too Many Requests
Yes
Rate limit exceeded
Back off and wait for reset
500
Internal Server Error
Yes
Temporary server error
Wait and retry with backoff
502
Bad Gateway
Yes
Upstream service unavailable
Wait and retry
503
Service Unavailable
Yes
Maintenance or overload
Wait longer before retrying
Non-Retryable Errors (4xx except 429)
Do not retry requests that return 400, 401, 402, 403, or 404. These indicate problems with your request that won't resolve by waiting:
Retryable Errors (429 and 5xx)
These errors are usually temporary and will likely succeed if retried with backoff:
Common Error Codes
Authentication Errors
INVALID_API_KEY
401
API key is malformed or doesn't exist
Check your API key format and value
MISSING_API_KEY
401
Authorization header is missing
Include Authorization: Bearer <key>
Correct format:
Request Parameter Errors
VALIDATION_ERROR
400
Parameter has invalid value or wrong type
Check parameter types and constraints
Example:
Fix — include all required parameters with correct types:
Credit Errors
INSUFFICIENT_CREDITS
402
Account has run out of API credits
Add credits via dashboard or upgrade plan
Example:
Do not retry a 402 — user action is required (top up credits):
Rate Limit Errors
RATE_LIMIT_EXCEEDED
429
Per-second or per-minute rate limit hit
Back off and retry after the reset window
Rate limits are enforced per API key on both a per-second and a per-minute basis based on your plan. The response headers indicate the current limit state:
Handle a 429:
Server Errors
—
500
Unexpected server error
Retry with exponential backoff
—
502
Upstream service unavailable
Retry with backoff
—
503
Service maintenance or overload
Wait longer before retrying
Retryable vs. Non-Retryable Summary
Authentication
401
No — fix your key
Bad request
400
No — fix your parameters
Insufficient credits
402
No — add credits
Forbidden
403
No — check permissions
Not found
404
No — check endpoint URL
Rate limited
429
Yes — wait for reset
Server errors
500, 502, 503
Yes — exponential backoff
Network timeout
—
Yes — retry with backoff
Production-Ready Python Retry Implementation
Debugging Tips
Frequently Asked Questions
Last updated