Class LlmHttpErrors

Assembly: redb.Route.Llm.dll

Turns a failed HTTP response into the right provider exception. One place, because the
mapping is the same for every OpenAI-shaped API and getting it wrong is invisible: a caller
that cannot tell 429 from 401 either retries a dead key forever or gives up on a queue that
would have cleared in a second.

public static class LlmHttpErrors

Inheritance

Object→LlmHttpErrors

Methods

FromResponse(string, HttpResponseMessage, string, string?)

Builds the exception for a non-2xx response: 429 →

public static Exception FromResponse(string providerId, HttpResponseMessage response, string message, string? rawBody)