Every failure response from the API uses the same envelope:Documentation Index
Fetch the complete documentation index at: https://docs.letmepost.dev/llms.txt
Use this file to discover all available pages before exploring further.
error.json
| field | always set | meaning |
|---|---|---|
code | yes | one of the eleven values below |
message | yes | human-readable explanation |
rule | when known | preflight rule id or validation field path |
platform | when known | which upstream platform was involved |
platformVersion | when known | the pinned upstream API version we targeted |
platformResponse | when known | raw upstream body, untouched |
remediation | usually | actionable next step |
requestId | always | echoed in the x-request-id response header |
traceId | when on | OTel trace id when tracing is active |
{ body: {}, message: "" }. If the upstream platform returned nothing meaningful, we still attach a code, message, and requestId.
The eleven codes
| code | typical HTTP | what it means |
|---|---|---|
validation_failed | 400 | Request body or query failed schema validation. |
preflight_failed | 400 | A documented platform constraint failed before the upstream call. |
platform_auth_failed | 401, 403 | The connected account’s token is missing, expired, or revoked. |
platform_rejected | 4xx (502 if mapped from an upstream 5xx) | Upstream rejected the call after preflight passed. |
platform_unavailable | 502, 503 | Upstream is down or rate-limited; safe to retry later. |
internal_error | 500 | Unexpected server-side issue. Includes a requestId to file. |
unauthenticated | 401 | Bearer header missing, malformed, or key revoked. |
unauthorized | 403 | Authenticated, but not allowed to perform this action. |
not_found | 404 | Resource doesn’t exist or is out of scope. |
idempotency_conflict | 409 | Same Idempotency-Key reused with a different body. |
rate_limited | 429 | Per-key rate limit exhausted. Honor Retry-After. |
Reading errors in code
The pattern is the same regardless of language:handle.ts
Why this matters
Ayrshare’s own documentation admits their error 138 “masks multiple distinct underlying causes.” That’s the failure mode we built to defeat. Every code on this page is narrow, stable, and documented; if we discover a new failure shape, we add a new code with its own page rather than fold it into an existing one.See also
- Each code links to its own page above with reproduction, response shape, and remediation.
preflightfor the full rule catalog whencodeispreflight_failed.