UNPKG

@lifi/sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

18 lines 577 B
import { getRootCause } from './utils/rootCause.js'; // Note: we use the BaseErrors to capture errors at specific points in the code // they can carry addition to help give more context export class BaseError extends Error { code; cause; constructor(name, code, message, cause) { super(message); this.name = name; this.code = code; this.cause = cause; const rootCause = getRootCause(this.cause); if (rootCause?.stack) { this.stack = rootCause.stack; } } } //# sourceMappingURL=baseError.js.map