> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Handling

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

Handle asynchronous SDK operations with `await` inside `try/catch`.

## Configuration errors

[NotteClient](/typescript-sdk-reference/manual/client) throws `AuthenticationError` for a missing API key and `InvalidRequestError` for an unsupported API URL. HTTPS is required for remote servers; HTTP is allowed on loopback for local development.

## API and execution errors

HTTP failures throw [NotteAPIError](/typescript-sdk-reference/manual/notteapierror), with `statusCode`, `path`, the parsed error body, and the response when available. Request deadlines throw [NotteTimeoutError](/typescript-sdk-reference/manual/nottetimeouterror). Failed actions throw `ActionExecutionError`; failed cloud function runs throw `FailedToRunCloudFunctionError` unless `raiseOnFailure: false` is set.

Treat caught values as `unknown`: check `error instanceof Error` before reading `error.message`. Do not depend on parsing error messages to identify HTTP status codes.

## Session cleanup

Use [Session.use](/typescript-sdk-reference/session/use) for managed sessions. It starts the session before your callback and stops it when the callback finishes, including when it throws. Catch errors around the awaited `use()` call so failures reach your error handler.

## Retrying failures

Do not retry every exception: configuration errors require a fix, and repeating a state-changing operation may duplicate work. See [Rate Limits](/typescript-sdk-reference/rate-limits) for retry considerations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.