Skip to content

Commit

Permalink
docs: register error handler using hook instead of hookOnce (#1743)
Browse files Browse the repository at this point in the history
  • Loading branch information
septatrix authored Sep 19, 2023
1 parent cb2034c commit 2cdb93f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/1.guide/7.plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ You can use plugins to capture all application errors.

```ts
export default defineNitroPlugin((nitro) => {
nitro.hooks.hookOnce("error", async (error, { event }) => {
nitro.hooks.hook("error", async (error, { event }) => {
console.error(`${event.path} Application error:`, error)
});
})
Expand Down

0 comments on commit 2cdb93f

Please sign in to comment.