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

# Non-retryable errors

Use `NonRetryableError` when retrying an automation cannot succeed without changing its input or configuration.

```typescript theme={null}
import { NonRetryableError } from "@intuned/runtime";

export default async function automation(params: { accountId?: string }) {
  if (!params.accountId) {
    throw new NonRetryableError("accountId is required");
  }

  // Continue the automation.
}
```

The error accepts a single message argument. When it is thrown:

* The current attempt fails.
* Intuned skips any remaining configured attempts for that automation phase.
* During AuthSession:Validate runs with auto-recreate enabled, if the error occurs during the first checks, the auth session will be recreated.
