Skip to content

Commit

Permalink
Merge pull request #425 from senacor/feature/adjust_logging
Browse files Browse the repository at this point in the history
Adjust logging of errors thrown by the handler
  • Loading branch information
ziegler-daniel authored Oct 2, 2024
2 parents 46f90a7 + 7f38eb1 commit ac1586b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 3.0.4 (02.10.2024)
* Fix logging of errors throw by the handler

## 3.0.3 (05.09.2024)
- Remove check for empty result

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@senacor/azure-function-middleware",
"version": "3.0.3",
"version": "3.0.4",
"description": "Middleware for azure functions to handle authentication, authorization, error handling and logging",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const middlewareCore =
}

if (isErrorResult(handlerResult)) {
context.error(`An caught error occurred in the execution of the handler: ${stringify(handlerResult)}`);
context.error(`An caught error occurred in the execution of the handler:`, handlerResult.$error);
return handlerResult.$error;
}

Expand Down

0 comments on commit ac1586b

Please sign in to comment.