"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createError = exports.GenericError = void 0;
class GenericError extends Error {
    constructor(spec) {
        super(spec.message);
        this.name = spec.code;
        this.code = spec.code;
        this.retry = spec.retry;
        this.details = spec.details || {};
        this.scriptError = spec.scriptError || false;
    }
}
exports.GenericError = GenericError;
function createError(spec) {
    return new GenericError(spec);
}
exports.createError = createError;
//# sourceMappingURL=error.js.map