Skip to main content
Every failed response has "success": false. What’s under error takes one of two shapes, depending on where the request failed.

Platform-level errors

Failures in authentication, credits, rate limiting, or an unrecognized route come from shared middleware that runs before any tool-specific code, and return a structured object with a stable code you can match on in your own error handling:
error.code
string
A stable, machine-readable identifier. Safe to switch on.
error.message
string
A human-readable explanation. Safe to show a user, not guaranteed to stay word-for-word identical between API versions.

Endpoint-level errors

Validation and execution failures inside an individual tool (a missing url, an unreachable target, a malformed upload) return error as a plain string instead:
Check the type of error before reading it: typeof error === "object" means a stable code is available; typeof error === "string" means it’s a message meant for a human, not for pattern matching. Both shapes always sit under the same error key.

Status codes

Error code reference

Retrying

Calling through the website’s own proxy at pocketutils.com/api/v1 (instead of api.pocketutils.com directly) adds one more possible failure: a 502 with { "success": false, "error": "Proxy Service Error", "message": "...", "details": "..." } if the proxy itself can’t reach the API. Direct integrations against api.pocketutils.com never see this shape.

Authentication

Avoid 401 errors before they happen.

Rate Limits & Credits

Avoid 429 and 402 errors before they happen.