# Errors

Every answer is JSON with `ok`. When it is false, `error` says what went wrong in words, and the status says what kind of problem it is.

## The shape

```json
{ "ok": true, "tool": "list_events", "result": [ … ] }
{ "ok": false, "error": "Sign in to use my_wallet." }
```

## Statuses, in words

| Status | Means |
| --- | --- |
| `400` | The input does not fit the tool (the answer lists the issues), or the body is not JSON. |
| `401` | The key is invalid, expired or revoked – or the tool needs sign-in and none came. |
| `402` | Your wallet has no gold left (code out_of_gold). Nothing ran. |
| `403` | A change sent with a browser session from another site, or a tool not open to you. |
| `404` | No tool by that name on this door. |
| `405` | A tool that changes something was called with GET. Use POST. |
| `429` | Too many requests from your IP this minute. Wait and retry. |
| `500` | Something broke on our side. Try again; if it keeps happening, tell us at pirateskills.com/contact. |

## In the CLI

The CLI turns these into exit codes – see [Flags and exit codes](https://pirateskills.com/docs/cli#flags).

---
Source: https://pirateskills.com/docs/errors · All docs: https://pirateskills.com/docs.md · Short overview: https://pirateskills.com/llms.txt
