UNPKG

forest-cli

Version:

The Lumberjacks' toolbelt is the Forest CLI which makes easy to manage your back office application directly from the terminal.

14 lines 801 B
/** Errors raised by the layout commands' HTTP adapter. */ /** A non-2xx response from a layout endpoint, normalized to status + detail. */ export declare class LayoutApiError extends Error { /** Best-effort human-readable explanation extracted from the response body. */ readonly detail: string; /** HTTP status code (0 when the request never reached the server). */ readonly status: number; constructor(status: number, detail: string); } /** Extract a readable message from a JSON:API error document (or raw text). */ export declare function extractDetail(body: unknown): string; /** Turn a superagent error into a {@link LayoutApiError} (status + readable detail). */ export declare function toLayoutApiError(error: unknown): LayoutApiError; //# sourceMappingURL=errors.d.ts.map