> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nylon.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug a failed request

> From a red row in the logs to the cause, using the error code Nylon recorded.

Nylon returns one error shape for every failure, whatever network caused it, and records the code alongside the request. That code is the fastest route to a cause — start there rather than reading the response body.

## Find the request

Open **Logs**, set **Timeline** to cover when it happened, and filter **Status** to `4xx` or `5xx`. If you know roughly what failed, narrow further by **Route**, **Platform** or **Account**.

The **Errors** filter lists the error codes that actually occurred in the range, which is often quicker than scanning rows — it tells you at a glance whether you have one problem twenty times or twenty problems once.

Select the row to see the request body you sent, the response Nylon returned, and the error code.

## What the status tells you

<AccordionGroup>
  <Accordion title="401 — authentication" icon="key">
    The key is wrong, revoked, or not being sent as `Authorization: Bearer <key>`. Check the key still exists on the **API** page and that its **Last used** is not stuck in the past.
  </Accordion>

  <Accordion title="402 — billing" icon="credit-card">
    The account you targeted is beyond your free allowance and billing is not active. The account is still connected; it is not being served. See [Accounts paused for billing](/help/paused-accounts).
  </Accordion>

  <Accordion title="422 — validation" icon="circle-slash">
    The post broke a network's rules and was refused **before** anything was sent — a caption over the limit, too many images, a file too large, a video too long. The error names the rule and the network.
  </Accordion>

  <Accordion title="429 — rate limit" icon="gauge">
    You went over 120 requests a minute, or 30 a minute for publishing. Every response carries the remaining budget and when it resets — back off on those rather than on a fixed sleep.
  </Accordion>

  <Accordion title="reauthentication_required" icon="refresh-cw">
    The account's credentials stopped working. Publishing to it will keep failing until someone reconnects it. See [An account says Reconnect](/help/account-needs-attention).
  </Accordion>

  <Accordion title="5xx — upstream or Nylon" icon="server">
    Either Nylon or the network had a problem. Check whether the same request succeeds on a different account and network — if only one network is failing, it is usually theirs.
  </Accordion>
</AccordionGroup>

## Validation failures are the cheap case

A 422 means nothing was sent anywhere. Nylon checks a post against every target network's limits first, so a caption too long for X does not go out on LinkedIn and then fail on X — the whole request is refused and you fix it before anything is public.

You can run that check on its own, without publishing, which is worth doing in your own test suite.

<Card title="Validated before anything sends" icon="shield-check" href="/publishing">
  The validation endpoint, and what it checks per network.
</Card>

## A partial failure is not an error

If a post published to three accounts and failed on a fourth, the request succeeded. The response tells you which target failed and why, and the row in the logs is not red.

Do not retry the whole post — that republishes on the three that worked. Retry the failed target.

## Still stuck

Email [support@nylon.dev](mailto:support@nylon.dev) with:

* The time of the request and the route
* The error code shown in the log entry
* The account and network it targeted

That is enough to trace the request on Nylon's side directly.

## Related

<Columns cols={2}>
  <Card title="Request logs" icon="activity" href="/help/request-logs">
    Filters, live mode and CSV export.
  </Card>

  <Card title="A post didn't publish" icon="send" href="/help/post-didnt-publish">
    When the request succeeded but nothing appeared.
  </Card>
</Columns>
