This commit is contained in:
robin
2022-04-12 00:51:40 +08:00
parent c2f8473fb5
commit 344562baf4
18 changed files with 940 additions and 39 deletions
+12
View File
@@ -0,0 +1,12 @@
'use strict';
const error = require('koa-json-error')
// 错误处理
module.exports = error((err) => {
return {
status : err.status,
message : err.message,
code : err.code,
res : false,
// postFormat: (e, obj) => process.env.NODE_ENV === 'production' ? _.omit(obj, 'stack') : obj
}
})