KIVEX

Handling errors and retries

How to handle each error, and when to retry.

Each error code tells your agent what to do next.

ErrorMeaningWhat to doRetry
BAD_REQUESTThe input doesn't match the schema.Fix the input. message describes the problem.No
NOT_SUPPORTEDThe site doesn't support this capability.Use one of the alternatives.No
NOT_ALLOWEDYou 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_FOUNDThe site or resource doesn't exist, or you can't access it.Check the id.No
UNKNOWNNo source has the value.Tell the person the site doesn't provide it.No
RATE_LIMITEDYou sent too many requests.Wait retryAfterMs.Yes, after waiting
SOURCE_UNAVAILABLEThe 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_LIMITED and SOURCE_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 idempotencyKey when 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.

On this page