Expand description
Mapping a provider’s error to a per-item code, once the runner’s own retries are spent.
item_code_for_status is the mapping by HTTP status alone, for a
provider that documents no error codes. workers_ai_item_code reads
Cloudflare Workers AI’s error code first, and falls back to the status
mapping for a code it does not list. RULES.md §15 states both tables.
Modules§
- workers_
ai_ codes - The Workers AI error codes this crate maps, with what each means in Cloudflare’s error reference.
Functions§
- item_
code_ for_ status - The per-item error code for a provider’s HTTP status, for a provider whose error body the runner does not read:
- workers_
ai_ item_ code - The per-item error code for a Cloudflare Workers AI error: the HTTP
status and the first
errors[].codeof its reply, when it gave one.