Documentation
¶
Overview ¶
Package failapi is the injected-failure half of a fault-injection stand-in for the Anthropic API: every request it serves gets one status, an Anthropic-shaped error body and any extra response headers. The rig's failproxy binary and the canary's zero-token failure runs both serve it, so the error body is written in exactly one place.
It never reads request headers: pointed at by ANTHROPIC_BASE_URL under subscription OAuth, the Authorization header on every request carries a live token.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Failure ¶
type Failure struct {
Status int
Type string // the error body's error.type, e.g. "api_error"
Message string // error.message; some StopFailure mappings key on it
Headers [][2]string // extra response headers as name, value pairs
// Hold delays the response, so the request stays in flight and a turn has produced no
// output yet; it ends early when the client gives up on the request.
Hold time.Duration
}
Failure is one injected response.
Click to show internal directories.
Click to hide internal directories.