> ## 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.

```python theme={null}
from intuned_runtime import NonRetryableError


async def automation(params: dict):
    if not params.get("accountId"):
        raise NonRetryableError("accountId is required")

    # Continue the automation.
```

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

* 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.
