Skip to content

Commit

Permalink
Update node.js/cds-serve.md
Browse files Browse the repository at this point in the history
Co-authored-by: René Jeglinsky <[email protected]>
  • Loading branch information
sjvans and renejeglinsky authored Jul 10, 2024
1 parent 87782bf commit 706a78a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node.js/cds-serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ cds.middlewares.after = [
]
```

::: tip
In order for a custom error middleware to be invoked, it must be registered _before_ the built-in `cds_error_handler`. That is, it must be added, for example, via `cds.middlewares.after.unshift()`.
::: tip Custom error middleware before `cds_error_handler`
To invoke a custom error middleware successfully, you must register it _before_ the built-in `cds_error_handler`. You can achieve that, for example, by adding the middleware using `cds.middlewares.after.unshift()`.
:::

::: warning _Be aware of the interdependencies of middlewares_ <!-- -->
Expand Down

0 comments on commit 706a78a

Please sign in to comment.