Skip to content

Commit

Permalink
Merge pull request #3 from EdamAme-x/jsdoc-on-error
Browse files Browse the repository at this point in the history
Jsdoc on error
  • Loading branch information
EdamAme-x authored May 28, 2024
2 parents 05e6f60 + a903386 commit 25f10d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hono-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =

/**
* `.onError()` handles an error and returns a customized Response.
*
* @see {@link https://hono.dev/api/hono#error-handling}
*
* @param {ErrorHandler} handler - request Handler for error
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* app.onError((err, c) => {
* console.error(`${err}`)
Expand Down

0 comments on commit 25f10d9

Please sign in to comment.