histoire
Version:
A fast story book powered by Vite
18 lines (17 loc) • 705 B
JavaScript
/** Capture lifecycle error, independent of transport schemas or SDK packages. */
export class PreviewError extends Error {
/** Stable service failure reason. */
code;
/** Whether changed external state may allow a later caller attempt. */
retryable;
/** Portable setup diagnosis attached only to classified setup failures. */
setup;
/** Retains deliberate public message without exposing browser causes. */
constructor(code, message, retryable = false, setup, cause) {
super(message, cause === undefined ? undefined : { cause });
this.name = 'PreviewError';
this.code = code;
this.retryable = retryable;
this.setup = setup;
}
}