Skip to main content

Module status

Module status 

Source
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[].code of its reply, when it gave one.