> For the complete documentation index, see [llms.txt](https://docs.slinky.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.slinky.network/developers/errors-and-retries.md).

# Errors and retries

A failed tool call is not always safe to repeat. Decide what to do from the HTTP status and from whether a payment authorization was created or sent.

<table><thead><tr><th width="103.8402099609375">Status</th><th width="225.02911376953125">Meaning</th><th>Recommended handling</th></tr></thead><tbody><tr><td><code>400</code></td><td>Invalid tool input</td><td>Correct the body. Do not repeat it unchanged.</td></tr><tr><td><code>402</code></td><td>Payment required</td><td>Read the requirement, apply policy and authorize if approved.</td></tr><tr><td><code>404</code></td><td>Resource unavailable</td><td>Refresh discovery and select the current URL.</td></tr><tr><td><code>429</code></td><td>Capacity or rate limit</td><td>Use Retry-After or bounded backoff with jitter.</td></tr><tr><td><code>5xx</code></td><td>Gateway or tool failure</td><td>Check payment state before trying again.</td></tr></tbody></table>

#### After a paid request

Once an authorization has been sent, a timeout does not prove that settlement failed. Repeating the task with a new authorization can lead to duplicate spend. Reuse an idempotency key when supported and reconcile the earlier operation before creating another payment.
