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

# Errors

> The exception hierarchy.

Every SDK error inherits from `MudraIDError`.

```python theme={null}
from mudraid import Agent, MudraIDError

try:
    response = agent.get(url)
except MudraIDError as exc:
    log.warning("SDK rejected the call: %s", exc)
```

## The subclasses

| Exception                           | Raised when                                                             |
| ----------------------------------- | ----------------------------------------------------------------------- |
| `MudraIDConfigError`                | `MUDRAID_API_KEY_ID` or `MUDRAID_SECRET` missing or empty               |
| `MudraIDAuthError`                  | MudraID rejected the credentials (401 from `/api/v1/auth/token`)        |
| `MudraIDRevokedError`               | Access denied (403: agent inactive, no platform access, scope rejected) |
| `MudraIDNetworkError`               | Could not reach MudraID, or the response was malformed                  |
| `MudraIDPlatformNotRegisteredError` | The URL's host isn't a registered platform for this agent               |

## Platform errors pass through

A 4xx or 5xx from the platform comes back as a normal `Response`. The SDK does not raise it. The one exception is 401, which the SDK retries once after refreshing the token.

For the full how-to, see [Handle errors](/guides/agent-developer/error-handling).
