YeeHooDevelopers
Developer Docs

Errors & Retry

Practical retry rules for async generation and webhook receivers.

Client requests

Retry when:

  • request timed out before you received a response
  • network connection dropped
  • the server returned a retriable 5xx

Use the same Idempotency-Key when retrying a create call.

Error shape and common codes

{"error":{"code":"invalid_request","message":"..."}}
HTTPCommon codeAction
400invalid_request, quote_errorFix model or parameters; do not retry unchanged
401unauthenticatedCheck the Bearer API key
402insufficient_creditsTop up or wait for reservations to release; inspect X-Yeehoo-Balance
403scope_forbiddenGrant the required scope or use another key
404model_not_found, task_not_foundCheck IDs and team-workspace ownership
409idempotency_conflictUse a new key for a different request body
409idempotency_in_progressFollow Retry-After, then retry the same key and body
429rate_limitBack off and honor Retry-After when present
5xxServer errorRetry a limited number of times with the same idempotency key

Task polling

Treat these separately:

  • transport failure: retry the poll
  • task failure: inspect the business error payload and decide whether to resubmit

Webhook receivers

If you return non-2xx, Yeehoo will retry until the retry budget is exhausted.

Return 2xx only after:

  • signature passes
  • request is accepted for internal processing

On this page