Skip to content

Commit

Permalink
feat: show error log when error throw in ResponseJson
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhen committed Apr 2, 2024
1 parent 2b0de52 commit 6b6f39a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/decorator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ export const ResponseJson =
rs = await oriValue.apply(this, args);
rs = dataWrapper(rs);
} catch (e) {
ctx.logger.error(e);
rs = errorWrapper(e);
}
ctx.body = rs;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "egg-fancy-decorator",
"version": "1.0.5",
"version": "1.0.6",
"description": "Decorator support plugin for egg framework",
"main": "lib/index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 6b6f39a

Please sign in to comment.