# Errors

This page lists how each ToriiDB layer reports failure: Go errors from `store`, text responses from `Exec`, and sentinel errors from `daemon`.

## Error Surface by Layer

| Source | Form |
|---|---|
| `store` methods | Go `error` values, or `(value, ok bool)` for lookups |
| `store.Exec` | Text: `OK`, `(nil)`, `(integer) n`, `error: ...`, `usage: ...`, `unknown: CMD` |
| `daemon` methods | `ErrNotFound`, `ErrBadRequest`, `ErrNoEmbedder` (wrapped, test with `errors.Is`) |

## Daemon Error Kinds

Over the socket, failures travel as an error `kind` that the client maps back to a sentinel error; the full table is in [Wire Protocol](/socket-daemon-protocol). `ErrAlreadyRunning` is returned only by `Start()` when another daemon already answers on the socket.

## Related Pages

- [Wire Protocol](/socket-daemon-protocol)
- [Command Summary](/cli-reference)
- [daemon](/api-reference-daemon)
