提交先锋
This commit is contained in:
1 parent
571ba2a8a1
commit
b7bbcca9dc
19 files changed
+19786
No files matched your search
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
class BizError extends Error {
|
||||
constructor({ errorCode, errorReason, errorReasonSupplement }) {
|
||||
super(JSON.stringify({ errorCode, errorReason, errorReasonSupplement }));
|
||||
this.name = 'BizError';
|
||||
this.errorCode = errorCode;
|
||||
this.errorReason = errorReason;
|
||||
this.errorReasonSupplement = errorReasonSupplement;
|
||||
}
|
||||
}
|
||||
|
||||
const errorInfoEnum = {
|
||||
data_exception: { errorCode: 'data_exception', errorReason: '数据异常' },
|
||||
workflow_not_found: { errorCode: 'work_flow_not_found', errorReason: '流程不存在' },
|
||||
task_not_found: { errorCode: 'task_not_found', errorReason: '任务不存在' },
|
||||
node_not_found: { errorCode: 'node_not_found', errorReason: '节点不存在' },
|
||||
line_not_found: { errorCode: 'line_not_found', errorReason: '线路不存在' },
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
BizError,
|
||||
errorInfoEnum,
|
||||
};
|
||||
Reference in new issue
Block a user