egg-normal-response-x
v1.1.3
Published
egg normal response plugin
Downloads
4
Maintainers
Readme
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.