UNPKG

@flowlab/all

Version:

A cool library focusing on handling various flows

73 lines (72 loc) 3.08 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigurationError = exports.AuthorizationError = exports.TimeoutError = exports.NodeExecutionError = exports.WorkflowError = void 0; // Define custom error classes inheriting from Error var WorkflowError = /** @class */ (function (_super) { __extends(WorkflowError, _super); function WorkflowError(message, workflowId) { var _this = _super.call(this, message) || this; _this.name = 'WorkflowError'; _this.workflowId = workflowId; return _this; } return WorkflowError; }(Error)); exports.WorkflowError = WorkflowError; var NodeExecutionError = /** @class */ (function (_super) { __extends(NodeExecutionError, _super); function NodeExecutionError(message, nodeId, stepId, workflowId) { var _this = _super.call(this, message, workflowId) || this; _this.name = 'NodeExecutionError'; _this.nodeId = nodeId; _this.stepId = stepId; return _this; } return NodeExecutionError; }(WorkflowError)); exports.NodeExecutionError = NodeExecutionError; var TimeoutError = /** @class */ (function (_super) { __extends(TimeoutError, _super); function TimeoutError(message, nodeId, stepId, workflowId) { var _this = _super.call(this, message, nodeId, stepId, workflowId) || this; _this.name = 'TimeoutError'; return _this; } return TimeoutError; }(NodeExecutionError)); exports.TimeoutError = TimeoutError; var AuthorizationError = /** @class */ (function (_super) { __extends(AuthorizationError, _super); function AuthorizationError(message, nodeId, stepId, workflowId) { var _this = _super.call(this, message, nodeId, stepId, workflowId) || this; _this.name = 'AuthorizationError'; return _this; } return AuthorizationError; }(NodeExecutionError)); exports.AuthorizationError = AuthorizationError; var ConfigurationError = /** @class */ (function (_super) { __extends(ConfigurationError, _super); function ConfigurationError(message) { var _this = _super.call(this, message) || this; _this.name = 'ConfigurationError'; return _this; } return ConfigurationError; }(Error)); exports.ConfigurationError = ConfigurationError;