# errors

Stable error vocabulary: responsibilities, supported exports and extension points.

## Purpose [#purpose]

Client-safe codes and resolvers turn transport errors into localized messages. Server handling logs unexpected failures and maps known errors to oRPC responses. Auth-client helpers interpret Better Auth errors.

## Public exports [#public-exports]

| Subpath | Target |
| --- | --- |
| `.` | `./src/index.ts` |
| `./auth-client-error` | `./src/auth-client-error.ts` |
| `./locales` | `./src/locales/index.ts` |
| `./server` | `./src/server.ts` |

These paths come from `packages/errors/package.json`. A `.` entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

## How to extend [#how-to-extend]

Introduce a stable code and catalog messages for an actionable new failure. Preserve its typed path across the boundary; do not display raw database/provider exception text.

Read the [stable error vocabulary guide](/docs/architecture/observability) for the full flow.

## Key files [#key-files]

- [`packages/errors/package.json`](https://github.com/CarlosZiegler/doro/blob/main/packages/errors/package.json)

