# Messages

How Axle's errors and warnings read, and where to look each one up.

When something goes wrong, Axle prints what is wrong and a hint that says how to fix it:

```text
error: no package.json or axle.toml found in /home/me/notes or any folder above it
hint: Run axle inside a repository: a folder that has a package.json, or any folder below it.
```

An `error:` stops the command. A `warning:` doesn't: Axle carries on, and the hint says what to change so it goes away.

Each error and warning has a page of its own in this section, which shows the message, says why it happens and how to fix it. The sidebar lists them all.

## Codes

Each message has a code, the name of its page: `no-package-json-found` is explained at `/docs/messages/no-package-json-found/`. Commands that print JSON, such as [`axle list --json`](https://axlers.dev/docs/reference/list.md#json-output) and [`axle run --json`](https://axlers.dev/docs/reference/run.md#json-events), put the code in the error or warning they print, so a tool can link to the right page.

Four messages describe a task rather than Axle itself and appear in a run's output without a code: [a task failed](https://axlers.dev/docs/messages/task-failed.md), [a task couldn't be started](https://axlers.dev/docs/messages/script-could-not-run.md), [a persistent task wasn't ready in time](https://axlers.dev/docs/messages/not-ready-in-time.md) and [a task uses a file that isn't among its inputs](https://axlers.dev/docs/messages/undeclared-input.md).
