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

# IdentityError

> A credential was offered and rejected (SPEC-v0.3 §3.2).

`ctrlrun.IdentityError` — class, defined at `src/ctrlrun/errors.py:194`

```python theme={null}
from ctrlrun import IdentityError
```

```python theme={null}
class IdentityError(CTRLRunError)
```

A credential was offered and rejected (SPEC-v0.3 §3.2).

Not an `ActionDenied`: an agent loop's `except ActionDenied` is written to handle a policy
saying no, and a credential that stopped being valid is not that — the same distinction
v0.1 §5.1 draws for `EffectKeyError`. A *missing* principal stays
`ActionDenied(reason="no_principal")`; this is for one that was produced and found wanting,
which includes an expired `Principal` reaching `Control.execute` (§2.3).

## Next

* [Python API index](/reference/api/index).
* [Get started](/get-started/quickstart) · [Why](/why).


## Related topics

- [Errors](/reference/errors.md)
- [IdentityProvider](/reference/api/IdentityProvider.md)
- [JWTIdentityProvider](/reference/api/jwt_identity-JWTIdentityProvider.md)
- [The Agent Control Standard](/ACS.md)
- [Python API](/reference/api/index.md)
