/** * Pull the human-readable bits out of a BoondManager error body. * * Boond returns JSON:API errors of the form: * { "errors": [ { "status": "422", "code": "422", "detail": "...", "title": "..." } ] } * * Surfacing `detail` (and `title` when present) gives the model a focused * message like `422 - password mismatch` instead of the full ~500-char body * dump that previously made it hard for the LLM to reason about the failure. * * Exported for unit testing. */ export declare function parseBoondErrorBody(body: string): string | null; /** * What a caller can do about a BoondManager 401, which depends on who holds * the credentials (issue #234). Under the HTTP OAuth transport the token * belongs to the MCP client, and the only remedy is a new authorization — * there is no CLI to re-run (the historical hint named one that is no longer * shipped). With env credentials it is the operator's configuration. */ export declare function hintForUnauthorized(): string; /** * A non-2xx answer from BoondManager, with the status kept as data so callers * (the HTTP transport's token validation, #234) can branch on it instead of * parsing the message. The message is unchanged from the plain `Error` this * replaces — `formatApiError()` output. */ export declare class BoondApiError extends Error { readonly status: number; readonly method: string; readonly path: string; constructor(message: string, status: number, method: string, path: string); } /** Build the Error message for a non-2xx HTTP response. Exported for testing. */ export declare function formatApiError(status: number, statusText: string, method: string, path: string, body: string): string; /** The error every helper raises when an attempt never completed within `BOOND_HTTP_TIMEOUT_MS`. */ export declare function timeoutError(timeoutMs: number, method: string, path: string, cause: unknown): Error; /** * A 2xx whose body is not JSON. Before #239 this surfaced as a bare * `SyntaxError: Unexpected token '<'` with no endpoint — indistinguishable * from a bug in the server — although it almost always means the request hit * the application shell or a WAF page rather than the API. */ export declare function nonJsonResponseError(status: number, method: string, path: string, cause: unknown): Error; //# sourceMappingURL=errors.d.ts.map