Error Codes
All API errors return a consistent JSON format:
{
"error": "Not Found",
"message": "Resume not found",
"statusCode": 404
}HTTP Status Codes
| Code | Name | Description |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid request body or parameters |
401 | Unauthorized | Missing or invalid API key |
402 | Payment Required | No credits remaining — buy more or wait for monthly reset |
403 | Forbidden | Action not allowed (e.g., BYOK without subscription) |
404 | Not Found | Resource doesn’t exist |
413 | Payload Too Large | File upload exceeds 10MB limit |
422 | Unprocessable Entity | Valid JSON but semantically invalid (e.g., job description too short) |
429 | Too Many Requests | Rate limit exceeded — retry after the Retry-After header value |
500 | Internal Server Error | Something went wrong on our end |
Common Error Scenarios
Missing API Key
{
"error": "Unauthorized",
"message": "Missing x-api-key header",
"statusCode": 401
}Fix: Add your API key to the x-api-key header.
Invalid API Key
{
"error": "Unauthorized",
"message": "Invalid API key",
"statusCode": 401
}Fix: Check your key at console.laddro.com . Keys may have been revoked.
No Credits
{
"error": "Payment Required",
"message": "No credits remaining. Purchase credits at console.laddro.com",
"statusCode": 402
}Fix: Buy a credit pack or wait for your monthly free tier reset.
BYOK Without Active Subscription
{
"error": "Forbidden",
"message": "BYOK requires an active recurring Laddro subscription",
"statusCode": 403
}Fix: Subscribe at laddro.com with a recurring plan.
Invalid Provider Key
{
"error": "Unprocessable Entity",
"message": "API key validation failed for provider 'anthropic': invalid_api_key",
"statusCode": 422
}Fix: Double-check your provider API key. The API validates keys with a test call before saving.
Retry Strategy
For 429 and 5xx errors, implement exponential backoff:
async function withRetry(fn: () => Promise<Response>, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fn()
if (response.status === 429) {
const retryAfter = parseInt(response.headers.get('Retry-After') || '1')
await new Promise(r => setTimeout(r, retryAfter * 1000))
continue
}
return response
} catch (error) {
if (i === maxRetries - 1) throw error
await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000))
}
}
}Last updated on