UNPKG

@getclave/lifi-sdk

Version:

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

22 lines (21 loc) 683 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseError = void 0; const rootCause_1 = require("./utils/rootCause"); // Note: we use the BaseErrors to capture errors at specific points in the code // they can carry addition to help give more context class BaseError extends Error { code; cause; constructor(name, code, message, cause) { super(message); this.name = name; this.code = code; this.cause = cause; const rootCause = (0, rootCause_1.getRootCause)(this.cause); if (rootCause?.stack) { this.stack = rootCause.stack; } } } exports.BaseError = BaseError;