/** * Error categorization for dockerode calls. Every runtime call routes through * `safe()` in `client.ts`, which runs `categorizeError` on any thrown error so * the UI and doctor can surface a stable `kind` + `userMessage` instead of a * raw stack. * * Adapted from signalk-updater-server/src/errors.ts. The plugin adds the * `socket-unreachable` kind: when the runtime moved from spawning a CLI binary * to talking a unix socket, "no runtime" stopped meaning "binary not on PATH" * and started meaning "socket missing or refusing the connection". That is the * single most common failure in the in-container topology (socket not * bind-mounted) and the doctor needs to name it distinctly. */ export type ErrorKind = "network" | "auth" | "disk" | "permission" | "not-found" | "socket-unreachable" | "unknown"; export interface CategorizedError { kind: ErrorKind; userMessage: string; raw: string; } export declare function categorizeError(err: unknown): CategorizedError; /** * The most informative message for a caught error, for surfacing to a * consumer/log. `safe()`/`safeInspect()` rethrow as `Error(userMessage, { * cause: CategorizedError })` — so the message alone is the generic * `userMessage` (e.g. "Unexpected error. See logs for details.") and the real * runtime text lives in `cause.raw`. Prefer that raw text when present; fall * back to the error's own message for errors thrown directly (not via `safe`). */ export declare function describeError(err: unknown): string; //# sourceMappingURL=errors.d.ts.map