Skip to content

Commit

Permalink
Merge pull request #10 from EdamAme-x/jsdoc-http-exception
Browse files Browse the repository at this point in the history
Jsdoc http exception
  • Loading branch information
EdamAme-x authored May 30, 2024
2 parents f2ff88a + 482d302 commit 5e1af0f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/http-exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ type HTTPExceptionOptions = {

/**
* `HTTPException` must be used when a fatal error such as authentication failure occurs.
*
* @see {@link https://hono.dev/api/exception}
*
* @param {StatusCode} status - status code of HTTPException
* @param {HTTPExceptionOptions} options - options of HTTPException
* @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException
* @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException
* @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException
*
* @example
* ```ts
* import { HTTPException } from 'hono/http-exception'
Expand All @@ -27,7 +36,6 @@ type HTTPExceptionOptions = {
* await next()
* })
* ```
* @see https://hono.dev/api/exception
*/
export class HTTPException extends Error {
readonly res?: Response
Expand Down

0 comments on commit 5e1af0f

Please sign in to comment.