"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntegrationError = void 0;
// Integration errors are external errors to Superblocks and thrown from API execution
const lodash_1 = require("lodash");
const types_1 = require("@superblocksteam/types");
class IntegrationError extends Error {
    code;
    internalCode;
    constructor(message, errorCode, internalCode) {
        super(message);
        this.name = 'IntegrationError';
        this.code = errorCode ?? types_1.Code.UNSPECIFIED;
        this.internalCode = (0, lodash_1.isEmpty)(internalCode) ? {} : internalCode;
    }
}
exports.IntegrationError = IntegrationError;
//# sourceMappingURL=integration.js.map