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

# Mark Failure • AI Agent SDK

> mark_failure: Mark a profile as failed.

# mark\_failure

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**FailoverManager**](../classes/FailoverManager) class in the [**failover**](../modules/failover) module.

Mark a profile as failed.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def mark_failure(profile: AuthProfile, error: str, is_rate_limit: bool) -> None
```

## Parameters

<ParamField query="profile" type="AuthProfile" required={true}>
  The profile that failed
</ParamField>

<ParamField query="error" type="str" required={true}>
  Error message
</ParamField>

<ParamField query="is_rate_limit" type="bool" required={false} default="False">
  Whether this is a rate limit error
</ParamField>

## Uses

* `profile.mark_rate_limited`
* `logger.warning`
* `profile.mark_error`
* `get_next_profile`
* `callback`
* `logger.error`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/llm/failover.py#L320">
  `praisonaiagents/llm/failover.py` at line 320
</Card>
