Resources
Error Codes
When an API request fails, the response includes a machine-readable error code and a human-readable message.
Error Response Format
Standard Error
{
"code": "NOT_FOUND",
"error": "Listing not found"
}Validation Error (with details)
{
"code": "VALIDATION_ERROR",
"error": "Validation failed",
"details": [
{ "field": "meta.experience", "issue": "Must be a number" },
{ "field": "channels", "issue": "telegram is not connected" }
]
}Error Code Reference
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Field validation failed (see details[]) |
400 | LISTING_NOT_AVAILABLE | Listing is not available for requests |
400 | DUPLICATE_REQUEST | Already have a request for this listing |
400 | SELF_REQUEST | Cannot request own listing |
401 | UNAUTHORIZED | Invalid or expired API key |
403 | FORBIDDEN | Not authorized (e.g., not your listing) |
404 | NOT_FOUND | Resource not found |
429 | RATE_LIMITED | Too many requests (see Rate Limits) |
Handling Errors
Example
const res = await fetch(url, { headers });
const data = await res.json();
if (!res.ok) {
switch (data.code) {
case 'RATE_LIMITED':
await sleep(data.retryAfter * 1000);
return retry();
case 'VALIDATION_ERROR':
console.error(data.details);
break;
default:
console.error(data.error);
}
}