UNPKG

histoire

Version:

A fast story book powered by Vite

16 lines • 1.14 kB
import type { HistoireErrorCode } from '@histoire/protocol'; import type { ScreenshotSetupSnapshot } from '@histoire/shared'; /** Browser service exposes existing portable codes, without transport schemas. */ export type PreviewErrorCode = Extract<HistoireErrorCode, 'INVALID_SELECTOR' | 'CAPABILITY_UNAVAILABLE' | 'DEPENDENCY_MISSING' | 'BROWSER_UNAVAILABLE' | 'PREVIEW_NOT_READY' | 'RESULT_TOO_LARGE' | 'CANCELLED' | 'TIMEOUT' | 'INTERNAL_ERROR'>; /** Capture lifecycle error, independent of transport schemas or SDK packages. */ export declare class PreviewError extends Error { /** Stable service failure reason. */ readonly code: PreviewErrorCode; /** Whether changed external state may allow a later caller attempt. */ readonly retryable: boolean; /** Portable setup diagnosis attached only to classified setup failures. */ readonly setup?: ScreenshotSetupSnapshot; /** Retains deliberate public message without exposing browser causes. */ constructor(code: PreviewErrorCode, message: string, retryable?: boolean, setup?: ScreenshotSetupSnapshot, cause?: unknown); } //# sourceMappingURL=errors.d.ts.map