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 6b6f39a commit d3d74b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/decorator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export const ResponseJson =
rs = await oriValue.apply(this, args);
rs = dataWrapper(rs);
} catch (e) {
ctx.logger.error(e);
ctx.app.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.6",
"version": "1.0.7",
"description": "Decorator support plugin for egg framework",
"main": "lib/index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit d3d74b0

Please sign in to comment.