> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.band.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.band.ai/_mcp/server.

# TypeScript Logging and Errors

Reference for `@band-ai/sdk` 1.0.0.

### Logging

| Logger          | Import              | Output                                                               |
| :-------------- | :------------------ | :------------------------------------------------------------------- |
| `NoopLogger`    | `@band-ai/sdk/core` | Nothing; the default                                                 |
| `ConsoleLogger` | `@band-ai/sdk/core` | `console.debug`, `console.info`, `console.warn`; errors to stderr    |
| `StderrLogger`  | `@band-ai/sdk/core` | Every level to stderr, for processes whose stdout carries a protocol |

A `Logger` is any object with `debug`, `info`, `warn` and `error` methods of type `(message: string, context?: Record<string, unknown>) => void`.

---

## Errors

Exported from `@band-ai/sdk/core`. All extend `BandSdkError`.

| Error                     | Raised when                                                                                                                                                      |
| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ValidationError`         | Configuration is missing or invalid, including the config loaders' errors                                                                                        |
| `RuntimeStateError`       | A lifecycle call is illegal in the current state, such as `start()` while `stop()` runs                                                                          |
| `UnsupportedFeatureError` | An adapter's optional peer package is missing, a tool is called whose capability is turned off, or the REST client does not provide an operation                 |
| `TransportError`          | A transport operation fails                                                                                                                                      |
| `RecoverableTurnError`    | A failure confined to one turn: that message is marked failed, and the room and every other room keep running. Any other error from an adapter stops the runtime |

Platform HTTP errors, such as `UnauthorizedError` for a `401`, come from the generated REST client and carry the status code and response body.