Handling errors and retries
How to handle each error, and when to retry.
Each error code tells your agent what to do next.
| Error | Meaning | What to do | Retry |
|---|---|---|---|
BAD_REQUEST | The input doesn't match the schema. | Fix the input. message describes the problem. | No |
NOT_SUPPORTED | The site doesn't support this capability. | Use one of the alternatives. | No |
NOT_ALLOWED | You aren't allowed to do this. | Check reason. operator_disabled and plan are set by the site. actor_level requires a different key. | No |
NOT_FOUND | The site or resource doesn't exist, or you can't access it. | Check the id. | No |
UNKNOWN | No source has the value. | Tell the person the site doesn't provide it. | No |
RATE_LIMITED | You sent too many requests. | Wait retryAfterMs. | Yes, after waiting |
SOURCE_UNAVAILABLE | The source didn't respond. With reason: knowledge_updating, the site's content is being updated. | Wait retryAfterMs if present, otherwise a few seconds. | Yes, a few times |
Retry policy
- Retry only
RATE_LIMITEDandSOURCE_UNAVAILABLE. - If the response includes
retryAfterMs, wait that long. - Otherwise, wait 1 s, 2 s and 4 s between attempts. Then stop and tell the person.
- For actions, always send the same
idempotencyKeywhen you retry, so the action can't run twice.
Every error response includes a docsUrl that links to the error reference, and a requestId. Include the requestId when you contact support.