Skip to main content

Error envelope

Application errors usually use this shape. Framework validation, rate limiting, and unhandled failures can differ; branch on HTTP status first.

Error types

FreshTalent does not use a credits envelope. Application errors are typed by error.type; framework errors may differ — see Authentication and Rate limits for the common cases.

Examples

400 invalid_request
404 not_found
402 payment_required
The exact statuses a route returns are listed on its reference page. Some legacy error messages use watch for a Target; treat the status and typed error as the contract, not the display wording.

Retries

  • Retry GET requests on transient network failures, 429, and 5xx with bounded exponential backoff, jitter, and a timeout. Honor Retry-After when supplied.
  • Do not automatically retry 400, 401, 402, 403, 404, or 409 without addressing the cause.
  • Do not blindly replay POST/PATCH after a timeout: the write may already have succeeded. Read the resource first. Adding list members can overwrite existing stage and notes.
  • Deduplicate downstream event writes by event UUID; a crash between the external write and your checkpoint can cause a replay. Use an idempotent destination or transactional outbox.

Framework error shape

Validation and rate-limit failures can instead use this shape (message is illustrative):
Do not assume error is always an object, or parse human-readable messages as stable identifiers. See the runnable client.