Skip to content

Commit 28dfb35

Browse files
committed
docs: update usage of logger section
AdminForth/1781/image
1 parent bfca311 commit 28dfb35

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

adminforth/documentation/docs/tutorial/08-UsageOfLogger.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ AF_LOG_SINGLE_LINE=true pnpm start
7070

7171
Accepted truthy values are `true` and `1`. When unset, logs use the default multi-line pretty format.
7272

73-
## Catching unhandled API handler errors
73+
## Catching unhandled API handler errors (work only with express v4)
7474

75-
When an unhandled error is thrown inside an AdminForth API endpoint handler (built-in or custom), AdminForth logs the
75+
Express 4.x.x doen't have build-in error handler, so adminforth comes with build-in one. When an unhandled error is thrown inside an AdminForth API endpoint handler (built-in or custom), AdminForth logs the
7676
error and responds with `500 Internal server error`. If you also want to forward these errors somewhere — for example
7777
to report them to an external error-tracking service like [Sentry](https://sentry.io/), or to do your own custom
7878
logging — set the `expressErrorCallback` option in your AdminForth config:
@@ -94,3 +94,5 @@ export const admin = new AdminForth({
9494
});
9595
```
9696

97+
>In express 5.x.x errors are handled automatically and this param is not supported
98+

0 commit comments

Comments
 (0)