Parses a provider error body into a program carrying an error block.
Wire format the body is written in.
Raw error body, as received from the provider.
Transport details used when the body is unparseable.
A program carrying the decoded error.
const program = parseProviderError("chat-completions", body, { status: 429 });const error = getFirstErrorBlock(program); Copy
const program = parseProviderError("chat-completions", body, { status: 429 });const error = getFirstErrorBlock(program);
Parses a provider error body into a program carrying an error block.