Skip to content

Commit

Permalink
docs: change jsdoc of http-exception
Browse files Browse the repository at this point in the history
  • Loading branch information
EdamAme-x committed May 28, 2024
1 parent 4e75b78 commit 482d302
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 482d302

Please sign in to comment.