/* * This file belongs to Hoist, an application development toolkit * developed by Extremely Heavy Industries (www.xh.io | info@xh.io) * * Copyright © 2026 Extremely Heavy Industries Inc. */ import type {PlainObject} from '@xh/hoist/core'; /** * A Hoist optimized Javascript Error object. */ export interface HoistException extends Error { isHoistException: true; /** Correlation ID associated with this exception, if any. */ correlationId?: string; /** Distributed trace ID associated with this exception, if any. */ traceId?: string; /** * Is the exception an expected, normal behavior of the app? * * Set to true for exceptions that should not be treated or logged as technical 'errors'. * (e.g. validation errors, permission errors, time-of-day errors). Default false. */ isRoutine: boolean; [x: string]: any; } /** * Exception thrown to indicate a timeout. * * Typically generated by the `Promise.timeout()` extension or calls to FetchService. */ export interface TimeoutException extends HoistException { isTimeout: true; /** Time in Milliseconds that was waited before exception was thrown. */ interval: number; } /** * Configuration for generating a timeout exception. * * @internal */ export interface TimeoutExceptionConfig extends PlainObject { interval: number; }