1.1.3 • Published 3 months ago
egg-normal-response-x v1.1.3
egg-normal-response
Install
$ npm i egg-normal-response-x --save
Usage
// {app_root}/config/plugin.js
exports.normalResponse = {
enable: true,
package: 'egg-normal-response-x',
};
Configuration
// {app_root}/config/config.default.js
exports.normalResponse = {
outSystemError:false,
systemErrorCode:500,
userErrorCode:600,
succeeCode:200,
ignore: ["/*","*/upload/*","/assets/*","/static/*"]
};
see config/config.default.js for more detail.
Example
error throw new UserRequestError("u-token不能为空","xxx",data);
Questions & Suggestions
Please open an issue here.