{"version":3,"sources":["../src/support/supportsErrorCause.ts","../src/utils/getMsgFromCls.ts","../src/utils/getNormalizedParams.ts","../src/utils/initProtoAndName.ts","../src/base/HttpException.ts","../src/base/HttpClientException.ts","../src/base/HttpServerException.ts","../src/client/HttpBadRequest.ts","../src/client/HttpConflict.ts","../src/client/HttpExpectationFailed.ts","../src/client/HttpFailedDependency.ts","../src/client/HttpForbidden.ts","../src/client/HttpGone.ts","../src/client/HttpImATeapot.ts","../src/client/HttpLengthRequired.ts","../src/client/HttpLocked.ts","../src/client/HttpMethodNotAllowed.ts","../src/client/HttpMisdirectedRequest.ts","../src/client/HttpNotAcceptable.ts","../src/client/HttpNotFound.ts","../src/client/HttpPayloadTooLarge.ts","../src/client/HttpPaymentRequired.ts","../src/client/HttpPreconditionFailed.ts","../src/client/HttpPreconditionRequired.ts","../src/client/HttpProxyAuthenticationRequired.ts","../src/client/HttpRangeNotSatisfiable.ts","../src/client/HttpRequestHeaderFieldsTooLarge.ts","../src/client/HttpRequestTimeout.ts","../src/client/HttpTooEarly.ts","../src/client/HttpTooManyRequests.ts","../src/client/HttpUnauthorized.ts","../src/client/HttpUnavailableForLegalReasons.ts","../src/client/HttpUnprocessableEntity.ts","../src/client/HttpUnsupportedMediaType.ts","../src/client/HttpUpgradeRequired.ts","../src/client/HttpUriTooLong.ts","../src/server/HttpBadGateway.ts","../src/server/HttpGatewayTimeout.ts","../src/server/HttpInsufficientStorage.ts","../src/server/HttpInternalServerError.ts","../src/server/HttpLoopDetected.ts","../src/server/HttpNetworkAuthenticationRequired.ts","../src/server/HttpNotExtended.ts","../src/server/HttpNotImplemented.ts","../src/server/HttpServiceUnavailable.ts","../src/server/HttpVariantAlsoNegotiates.ts","../src/server/HttpVersionNotSupported.ts","../src/typeguards/isHttpErrorStatusCode.ts","../src/status/index.ts","../src/factory/createHttpException.ts"],"names":["supportsErrorCause","cause","splitCapsRegexp","getMsgFromCls","className","match","word","idx","getNormalizedParams","name","msgOrParams","message","rest","initProtoAndName","obj","cls","HttpException","_HttpException","statusCode","c","m","p","HttpClientException","_HttpClientException","HttpServerException","_HttpServerException","status","HttpBadRequest","_HttpBadRequest","HttpConflict","_HttpConflict","HttpExpectationFailed","_HttpExpectationFailed","HttpFailedDependency","_HttpFailedDependency","HttpForbidden","_HttpForbidden","HttpGone","_HttpGone","HttpImATeapot","_HttpImATeapot","HttpLengthRequired","_HttpLengthRequired","HttpLocked","_HttpLocked","HttpMethodNotAllowed","_HttpMethodNotAllowed","HttpMisdirectedRequest","_HttpMisdirectedRequest","HttpNotAcceptable","_HttpNotAcceptable","HttpNotFound","_HttpNotFound","HttpPayloadTooLarge","_HttpPayloadTooLarge","HttpPaymentRequired","_HttpPaymentRequired","HttpPreconditionFailed","_HttpPreconditionFailed","HttpPreconditionRequired","_HttpPreconditionRequired","HttpProxyAuthenticationRequired","_HttpProxyAuthenticationRequired","HttpRangeNotSatisfiable","_HttpRangeNotSatisfiable","HttpRequestHeaderFieldsTooLarge","_HttpRequestHeaderFieldsTooLarge","HttpRequestTimeout","_HttpRequestTimeout","HttpTooEarly","_HttpTooEarly","HttpTooManyRequests","_HttpTooManyRequests","HttpUnauthorized","_HttpUnauthorized","HttpUnavailableForLegalReasons","_HttpUnavailableForLegalReasons","HttpUnprocessableEntity","_HttpUnprocessableEntity","issues","restParams","HttpUnsupportedMediaType","_HttpUnsupportedMediaType","HttpUpgradeRequired","_HttpUpgradeRequired","HttpUriTooLong","_HttpUriTooLong","HttpBadGateway","_HttpBadGateway","HttpGatewayTimeout","_HttpGatewayTimeout","HttpInsufficientStorage","_HttpInsufficientStorage","HttpInternalServerError","_HttpInternalServerError","HttpLoopDetected","_HttpLoopDetected","HttpNetworkAuthenticationRequired","_HttpNetworkAuthenticationRequired","HttpNotExtended","_HttpNotExtended","HttpNotImplemented","_HttpNotImplemented","HttpServiceUnavailable","_HttpServiceUnavailable","HttpVariantAlsoNegotiates","_HttpVariantAlsoNegotiates","HttpVersionNotSupported","_HttpVersionNotSupported","isHttp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AAKtC,CAAAA,CACL,GAAA,CAAKQ,CAAAA,CACL,GAAA,CAAKI,EACL,GAAA,CAAKgB,CAAAA,CACL,IAAKJ,CAAAA,CACL,GAAA,CAAKgC,EACL,GAAA,CAAKJ,CAAAA,CACL,IAAKlB,CAAAA,CACL,GAAA,CAAKhC,EACL,GAAA,CAAKQ,CAAAA,CACL,IAAKQ,CAAAA,CACL,GAAA,CAAK8B,EACL,GAAA,CAAKlC,CAAAA,CACL,GAAA,CAAKV,CAAAA,CACL,GAAA,CAAKoC,CAAAA,CACL,IAAKc,CAAAA,CACL,GAAA,CAAKxB,EACL,GAAA,CAAKY,CAAAA,CACL,IAAKN,CAAAA,CACL,GAAA,CAAKU,EACL,GAAA,CAAKkB,CAAAA,CACL,IAAKQ,CAAAA,CACL,GAAA,CAAKd,EACL,GAAA,CAAKgB,CAAAA,CACL,IAAKd,CAAAA,CACL,GAAA,CAAKkB,CAAAA,CACL,GAAA,CAAKF,CAAAA,CACL,GAAA,CAAKd,EACL,GAAA,CAAKI,CAAAA,CAGL,IAAKI,CAAAA,CACL,GAAA,CAAKF,CAWP,CAAA,CCzEO,IAAMc,GAAsB,CACjC7F,CAAAA,CACAR,IAC+B,CAC/B,GAAImG,GAAgD3F,CAAU,CAAA,CAAG,CAC/D,IAAMH,CAAAA,CAAM+F,EAAAA,GAAY5F,CAAU,CAAA,CAClC,OAAIH,EACK,IAAIA,CAAAA,CAAIL,CAAW,CAAA,CAG1BQ,CAAAA,CAAa,IACT,IAAII,CAAAA,CAAoBJ,EAAYR,CAAW,CAAA,CAC/C,IAAIc,CAAAA,CAAoBN,CAAAA,CAAYR,CAAW,CAEvD,CACA,OAAO,IAAIM,CAAAA,CAAcE,CAAAA,CAAYR,CAAW,CAGlD","file":"chunk-PKMAG4WX.cjs","sourcesContent":["export const supportsErrorCause = () => {\n  const cause = Symbol('');\n  // eslint-disable-next-line unicorn/error-message\n  return new Error('', { cause })?.cause === cause;\n};\n","const splitCapsRegexp = /[A-Z]/g;\n/**\n * Return default message based on http exception className\n * @internal\n */\nexport const getMsgFromCls = (className: string) => {\n  const preserveName =\n    className.endsWith('Exception') || className === 'HttpVersionNotSupported';\n  return (preserveName ? className : className.slice(4))\n    .replaceAll(splitCapsRegexp, (match) => ` ${match}`)\n    .trim()\n    .split(' ')\n    .map((word, idx) => (idx === 0 ? word : word.toLowerCase()))\n    .join(' ');\n};\n","import type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getMsgFromCls } from './getMsgFromCls';\n\n/**\n * Return params applicable to parent HttpException class when calling super();\n *\n * @internal\n */\nexport const getNormalizedParams = (\n  name: string,\n  msgOrParams?: HttpExceptionParams | string\n): HttpExceptionParams => {\n  const { message, ...rest } = {\n    ...(typeof msgOrParams === 'string'\n      ? { message: msgOrParams }\n      : (msgOrParams ?? {})),\n  };\n  return {\n    ...rest,\n    message: message ?? getMsgFromCls(`Http${name}`),\n  };\n};\n","import type { HttpException } from '../base/HttpException';\n\n/**\n * @internal\n */\nexport const initProtoAndName = (\n  obj: HttpException | Error,\n  name: string,\n  cls: { prototype: object }\n) => {\n  Object.setPrototypeOf(obj, cls.prototype);\n  obj.name = `Http${name}`;\n};\n","import { supportsErrorCause } from '../support/supportsErrorCause';\nimport type { HttpErrorStatusCodeOrNumber } from '../types';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport type { HttpMethod } from '../types/HttpMethod';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\nexport class HttpException extends Error implements HttpExceptionParams {\n  /**\n   * If set and the runtime (browser or node) supports it\n   * you can get back the error cause\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n   */\n  public override readonly cause?: Error | HttpException | undefined;\n\n  /**\n   * Custom additional code (ie: 'ERR_UNREACHABLE_SERVICE', 'AbortError', 'cdg1::h99k2-1664884491087-b41a2832f559'...)\n   */\n  public readonly code: string | undefined;\n\n  /**\n   * Inform about an unique error identifier (ie: nanoid, cuid...)\n   */\n  public readonly errorId: string | undefined;\n\n  /**\n   * Http method\n   */\n  public readonly method: HttpMethod | undefined;\n\n  /**\n   * Http error status code (400-599)\n   */\n  public readonly statusCode: HttpErrorStatusCodeOrNumber;\n\n  /**\n   * Indicates the original url that caused the error.\n   */\n  public readonly url: string | undefined;\n\n  /**\n   * Construct a new HttpException class\n   *\n   * @param statusCode http status code between 400-599, no checks are done on the validity of the number.\n   * @param msgOrParams either a message or an object containing HttpExceptionParams\n   */\n  constructor(\n    statusCode: HttpErrorStatusCodeOrNumber,\n    msgOrParams?: HttpExceptionParams | string\n  ) {\n    const name = 'Exception';\n    const {\n      cause: c,\n      message: m,\n      ...p\n    } = getNormalizedParams(name, msgOrParams);\n    super(m);\n    if (supportsErrorCause() && c instanceof Error) {\n      this.cause = c;\n    }\n    this.statusCode = statusCode;\n    this.url = p.url;\n    this.errorId = p.errorId;\n    this.code = p.code;\n    this.method = p.method;\n    initProtoAndName(this, name, HttpException);\n  }\n}\n","import type { HttpErrorStatusCodeOrNumber } from '../types';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\nimport { HttpException } from './HttpException';\n\n/**\n * Construct a new HttpClientException class\n *\n * @param statusCode http status code between 400-499, no checks are done on the validity of the number.\n * @param msgOrParams either a message or an object containing HttpExceptionParams\n */\nexport class HttpClientException extends HttpException {\n  constructor(\n    statusCode: HttpErrorStatusCodeOrNumber,\n    msgOrParams?: HttpExceptionParams | string\n  ) {\n    const name = 'ClientException';\n    super(statusCode, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpClientException);\n  }\n}\n","import type { HttpErrorStatusCodeOrNumber } from '../types';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\nimport { HttpException } from './HttpException';\n\n/**\n * Construct a new HttpServerException class\n *\n * @param statusCode http status code between 500-599, no checks are done on the validity of the number.\n * @param msgOrParams either a message or an object containing HttpExceptionParams\n */\nexport class HttpServerException extends HttpException {\n  constructor(\n    statusCode: HttpErrorStatusCodeOrNumber,\n    msgOrParams?: HttpExceptionParams | string\n  ) {\n    const name = 'ServerException';\n    super(statusCode, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpServerException);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 400 Bad Request (client)\n *\n * The server cannot or will not process the request due to something that is perceived to be a client error\n * (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).\n *\n * Note that a lot of apis/frameworks uses 422 Unprocessable Entity to indicate (form field) validation errors\n * rather the 400 Bad Request status code.\n *\n * @see https://httpstatus.in/400/\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400\n */\nconst status = 400;\nconst name = 'BadRequest';\nexport class HttpBadRequest extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpBadRequest);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 409 Conflict (client)\n *\n * This response is sent when a request conflicts with the current state of the server.\n *\n * @see https://httpstatus.in/409/\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409\n */\nconst status = 409;\nconst name = 'Conflict';\nexport class HttpConflict extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpConflict);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * Client status 417\n *\n * The HTTP 417 Expectation Failed client error response code indicates that the expectation given\n * in the request's Expect header could not be met.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/417\n * @see https://httpstatus.in/417/\n */\nconst status = 417;\nconst name = 'ExpectationFailed';\nexport class HttpExpectationFailed extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpExpectationFailed);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 424 Failed dependency (client / webdav specific)\n *\n * The method could not be performed on the resource because the requested action depended on another action\n * and that action failed.\n *\n * For example, if a command in a PROPPATCH method fails, then, at minimum, the rest of the commands will\n * also fail with 424 Failed Dependency.\n *\n * @see https://httpstatus.in/424/\n */\n\nconst status = 424;\nconst name = 'FailedDependency';\nexport class HttpFailedDependency extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpFailedDependency);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 403 Forbidden (client)\n *\n * The client does not have access rights to the content; that is, it is unauthorized, so the server\n * is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403\n * @see https://httpstatus.in/403/\n */\nconst status = 403;\nconst name = 'Forbidden';\nexport class HttpForbidden extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpForbidden);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 410 Gone (client)\n *\n * This response is sent when the requested content has been permanently deleted from server, with no forwarding address.\n * Clients are expected to remove their caches and links to the resource. The HTTP specification intends\n * this status code to be used for \"limited-time, promotional services\".\n *\n * APIs should not feel compelled to indicate resources that have been deleted with this status code.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410\n * @see https://httpstatus.in/410/\n */\nconst status = 410;\nconst name = 'Gone';\nexport class HttpGone extends HttpClientException {\n  static readonly STATUS = status;\n  // static override readonly name = 'HttpNotFound';\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpGone);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 418 I'm a teapot (client)\n *\n * The server refuses the attempt to brew coffee with a teapot.\n *\n * @see https://httpstatus.in/418/\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418\n */\n\nconst status = 418;\nconst name = 'ImATeapot';\n\nexport class HttpImATeapot extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpImATeapot);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 411 Length required\n *\n * Server rejected the request because the Content-Length header field is not defined and the server requires it.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/411\n * @see https://httpstatus.in/411/\n */\n\nconst status = 411;\nconst name = 'LengthRequired';\nexport class HttpLengthRequired extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpLengthRequired);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 423 Locked (client / webdav specific)\n *\n * The source or destination resource of a method is locked. This response SHOULD contain an\n * appropriate precondition or postcondition code, such as ‘lock-token-submitted’ or ‘no-conflicting-lock’.\n *\n * @see https://httpstatus.in/423/\n */\nconst status = 423;\nconst name = 'Locked';\nexport class HttpLocked extends HttpClientException {\n  static readonly STATUS = status;\n  // static override readonly name = 'HttpNotFound';\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpLocked);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 405 Method not allowed (client)\n *\n * The request method is known by the server but is not supported by the target resource.\n * For example, an API may not allow calling DELETE to remove a resource.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405\n * @see https://httpstatus.in/405/\n */\nconst status = 405;\nconst name = 'MethodNotAllowed';\nexport class HttpMethodNotAllowed extends HttpClientException {\n  static readonly STATUS = status;\n  // static override readonly name = 'HttpNotFound';\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpMethodNotAllowed);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 421 Misdirected Request (client)\n *\n * The request was directed at a server that is not able to produce a response. This can be sent by a server that\n * is not configured to produce responses for the combination of scheme and authority that are included\n * in the request URI.\n *\n * @see https://httpstatus.in/421/\n */\nconst status = 421;\nconst name = 'MisdirectedRequest';\nexport class HttpMisdirectedRequest extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpMisdirectedRequest);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 406 Not acceptable (client)\n *\n * This response is sent when the web server, after performing server-driven content negotiation, doesn't find\n * any content that conforms to the criteria given by the user agent.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406\n * @see https://httpstatus.in/406/\n */\nconst status = 406;\nconst name = 'NotAcceptable';\nexport class HttpNotAcceptable extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpNotAcceptable);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 404 - Not found (client)\n *\n * The server can not find the requested resource. In the browser, this means the URL is not recognized.\n * In an API, this can also mean that the endpoint is valid but the resource itself does not exist.\n * Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an\n * unauthorized client.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404\n * @see https://httpstatus.in/404/\n */\nconst status = 404;\nconst name = 'NotFound';\nexport class HttpNotFound extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpNotFound);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 413 Payload too large (client)\n *\n * Request entity is larger than limits defined by server. The server might close the connection or return an Retry-After header field.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413\n * @see https://httpstatus.in/413/\n */\nconst status = 413;\nconst name = 'PayloadTooLarge';\nexport class HttpPayloadTooLarge extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpPayloadTooLarge);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 402 Payment required (client)\n *\n * This response code is reserved for future use. The initial aim for creating this code was using it for digital\n * payment systems, however this status code is used very rarely and no standard convention exists.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402\n * @see https://httpstatus.in/402/\n */\n\nconst status = 402;\nconst name = 'PaymentRequired';\nexport class HttpPaymentRequired extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpPaymentRequired);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 412 Precondition Failed (client)\n *\n * The client has indicated preconditions in its headers which the server does not meet.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412\n * @see https://httpstatus.in/412/\n */\nconst status = 412;\nconst name = 'PreconditionFailed';\nexport class HttpPreconditionFailed extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpPreconditionFailed);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 428 Precondition Required (client)\n *\n * The origin server requires the request to be conditional. This response is intended to prevent the\n * 'lost update' problem, where a client GETs a resource's state, modifies it and PUTs it back to the\n * server, when meanwhile a third party has modified the state on the server, leading to a conflict.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/428\n * @see https://httpstatus.in/428/\n */\nconst status = 428;\nconst name = 'PreconditionRequired';\nexport class HttpPreconditionRequired extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpPreconditionRequired);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 407 Proxy authentication required (client)\n *\n * This is similar to 401 Unauthorized but authentication is needed to be done by a proxy\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407\n * @see https://httpstatus.in/407/\n */\nconst status = 407;\nconst name = 'ProxyAuthenticationRequired';\nexport class HttpProxyAuthenticationRequired extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpProxyAuthenticationRequired);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 416 Range Not Satisfiable (client)\n *\n * The range specified by the Range header field in the request cannot be fulfilled.\n * It's possible that the range is outside the size of the target URI's data.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416\n * @see https://httpstatus.in/416/\n */\nconst status = 416;\nconst name = 'RangeNotSatisfiable';\nexport class HttpRangeNotSatisfiable extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpRangeNotSatisfiable);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 431 Request Header Fields Too Large (client)\n *\n * The server is unwilling to process the request because its header fields are too large.\n * The request may be resubmitted after reducing the size of the request header fields.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431\n * @see https://httpstatus.in/431/\n */\nconst status = 431;\nconst name = 'RequestHeaderFieldsTooLarge';\nexport class HttpRequestHeaderFieldsTooLarge extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpRequestHeaderFieldsTooLarge);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 408 Request timeout (client)\n *\n * This response is sent on an idle connection by some servers, even without any previous request by the client.\n * It means that the server would like to shut down this unused connection. This response is used much more\n * since some browsers, like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing.\n * Also note that some servers merely shut down the connection without sending this message.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408\n * @see https://httpstatus.in/408/\n */\nconst status = 408;\nconst name = 'RequestTimeout';\nexport class HttpRequestTimeout extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpRequestTimeout);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 425 Too early (client / experimental)\n *\n * Indicates that the server is unwilling to risk processing a request that might be replayed.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/425\n */\nconst status = 425;\nconst name = 'TooEarly';\nexport class HttpTooEarly extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpTooEarly);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 429 Too Many Requests (client)\n *\n * The user has sent too many requests in a given amount of time (\"rate limiting\").\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429\n * @see https://httpstatus.in/429/\n */\nconst status = 429;\nconst name = 'TooManyRequests';\nexport class HttpTooManyRequests extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpTooManyRequests);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 401 Unauthorized (client)\n *\n * Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\".\n * That is, the client must authenticate itself to get the requested response.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401\n * @see https://httpstatus.in/401/\n */\n\nconst status = 401;\nconst name = 'Unauthorized';\nexport class HttpUnauthorized extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpUnauthorized);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 451 Unavailable For Legal Reasons (client)\n *\n * The user agent requested a resource that cannot legally be provided, such as a web page censored by a government.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/451\n * @see https://httpstatus.in/451/\n */\n\nconst status = 451;\nconst name = 'UnavailableForLegalReasons';\nexport class HttpUnavailableForLegalReasons extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpUnavailableForLegalReasons);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParamsWithIssues } from '../types/HttpExceptionParamsWithIssues';\nimport type { HttpValidationIssue } from '../types/HttpValidationIssue';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 422 Unprocessable entity (client / webdav specific per RFC / used for validation errors in most apis)\n *\n * The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code\n * is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is\n * inappropriate) but was unable to process the contained instructions.\n *\n * For example, this error condition may occur if an XML request body contains well-formed\n * (i.e., syntactically correct), but semantically erroneous, XML instructions.\n *\n * Note that a lot of apis/frameworks uses 422 Unprocessable Entity to indicate (form field) validation errors\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422\n * @see https://httpstatus.in/422/\n */\n\nconst status = 422;\nconst name = 'UnprocessableEntity';\nexport class HttpUnprocessableEntity extends HttpClientException {\n  static readonly STATUS = status;\n  public readonly issues: HttpValidationIssue[];\n  constructor(msgOrParams?: HttpExceptionParamsWithIssues | string) {\n    const { issues = [], ...restParams } =\n      typeof msgOrParams === 'string' ? {} : (msgOrParams ?? {});\n\n    super(status, getNormalizedParams(name, restParams));\n    this.issues = issues;\n    initProtoAndName(this, name, HttpUnprocessableEntity);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 415 Unsupported Media Type (client)\n *\n * The media format of the requested data is not supported by the server, so the server is rejecting the request.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415\n * @see https://httpstatus.in/415/\n */\nconst status = 415;\nconst name = 'UnsupportedMediaType';\nexport class HttpUnsupportedMediaType extends HttpClientException {\n  static readonly STATUS = 415;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpUnsupportedMediaType);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 426 Upgrade Required (client)\n *\n * The server refuses to perform the request using the current protocol but might be willing to do so after\n * the client upgrades to a different protocol. The server sends an Upgrade header in a 426 response\n * to indicate the required protocol(s).\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426\n */\n\nconst status = 426;\nconst name = 'UpgradeRequired';\nexport class HttpUpgradeRequired extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpUpgradeRequired);\n  }\n}\n","import { HttpClientException } from '../base/HttpClientException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 414 URI too long (client)\n *\n * The URI requested by the client is longer than the server is willing to interpret.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/414\n * @see https://httpstatus.in/414/\n */\nconst status = 414;\nconst name = 'UriTooLong';\nexport class HttpUriTooLong extends HttpClientException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpUriTooLong);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 502 Bad Gateway (server)\n *\n * This error response means that the server, while working as a gateway to get a response needed to\n * handle the request, got an invalid response.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502\n */\nconst status = 502;\nconst name = 'BadGateway';\n\nexport class HttpBadGateway extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpBadGateway);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 504 Gateway Timeout (server)\n *\n * This error response is given when the server is acting as a gateway and cannot get a response in time.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504\n * @see https://httpstatus.in/504/\n */\nconst status = 504;\nconst name = 'GatewayTimeout';\nexport class HttpGatewayTimeout extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpGatewayTimeout);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 507 Insufficient Storage (client / webdav specific)\n *\n * The method could not be performed on the resource because the server is unable to store the representation\n * needed to successfully complete the request.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/507\n */\nconst status = 507;\nconst name = 'InsufficientStorage';\nexport class HttpInsufficientStorage extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpInsufficientStorage);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 500 Internal Server Error (server)\n *\n * The server has encountered a situation it does not know how to handle.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500\n * @see https://httpstatus.in/500/\n */\n\nconst status = 500;\nconst name = 'InternalServerError';\nexport class HttpInternalServerError extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpInternalServerError);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 508 Loop Detected (server / webdav specific)\n *\n * The server detected an infinite loop while processing the request.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508\n * @see https://httpstatus.in/508/\n */\n\nconst status = 508;\nconst name = 'LoopDetected';\nexport class HttpLoopDetected extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpLoopDetected);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 511 Network Authentication Required (server)\n *\n * Indicates that the client needs to authenticate to gain network access.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/511\n * @see https://httpstatus.in/511/\n */\n\nconst status = 511;\nconst name = 'NetworkAuthenticationRequired';\nexport class HttpNetworkAuthenticationRequired extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpNetworkAuthenticationRequired);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 510 Not Extended (server)\n *\n * Further extensions to the request are required for the server to fulfill it.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510\n * @see https://httpstatus.in/510/\n */\n\nconst status = 510;\nconst name = 'NotExtended';\nexport class HttpNotExtended extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpNotExtended);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 501 Not Implemented\n *\n * The request method is not supported by the server and cannot be handled. The only methods that\n * servers are required to support (and therefore that must not return this code) are GET and HEAD.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501\n * @see https://httpstatus.in/501/\n */\n\nconst status = 501;\nconst name = 'NotImplemented';\nexport class HttpNotImplemented extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpNotImplemented);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 503 Service Unavailable\n *\n * The server is not ready to handle the request. Common causes are a server that is down for maintenance\n * or that is overloaded. Note that together with this response, a user-friendly page explaining the problem\n * should be sent.\n *\n * This response should be used for temporary conditions and the Retry-After HTTP header should, if possible,\n * contain the estimated time before the recovery of the service. The webmaster must also take care about the\n * caching-related headers that are sent along with this response, as these temporary condition responses\n * should usually not be cached.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503\n * @see https://httpstatus.in/503/\n */\nconst status = 503;\nconst name = 'ServiceUnavailable';\nexport class HttpServiceUnavailable extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpServiceUnavailable);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 506 Variant Also Negotiates (server)\n *\n * The server has an internal configuration error: the chosen variant resource is configured to engage\n * in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506\n * @see https://httpstatus.in/506/\n */\nconst status = 506;\nconst name = 'VariantAlsoNegotiates';\nexport class HttpVariantAlsoNegotiates extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpVariantAlsoNegotiates);\n  }\n}\n","import { HttpServerException } from '../base/HttpServerException';\nimport type { HttpExceptionParams } from '../types/HttpExceptionParams';\nimport { getNormalizedParams } from '../utils/getNormalizedParams';\nimport { initProtoAndName } from '../utils/initProtoAndName';\n\n/**\n * 505 HTTP Version Not Supported\n *\n * The HTTP version used in the request is not supported by the server.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/505\n * @see https://httpstatus.in/505/\n */\n\nconst status = 505;\nconst name = 'VersionNotSupported';\nexport class HttpVersionNotSupported extends HttpServerException {\n  static readonly STATUS = status;\n  constructor(msgOrParams?: HttpExceptionParams | string) {\n    super(status, getNormalizedParams(name, msgOrParams));\n    initProtoAndName(this, name, HttpVersionNotSupported);\n  }\n}\n","import type { HttpErrorStatusCodeOrNumber } from '../types/HttpErrorStatusCodeOrNumber';\n\nexport const isHttpErrorStatusCode = <\n  T extends HttpErrorStatusCodeOrNumber = HttpErrorStatusCodeOrNumber,\n>(\n  statusCode: unknown\n): statusCode is T => {\n  return typeof statusCode === 'number' && statusCode > 399 && statusCode < 600;\n};\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport {\n  HttpBadRequest,\n  HttpConflict,\n  HttpExpectationFailed,\n  HttpFailedDependency,\n  HttpForbidden,\n  HttpGone,\n  HttpImATeapot,\n  HttpLengthRequired,\n  HttpLocked,\n  HttpMethodNotAllowed,\n  HttpMisdirectedRequest,\n  HttpNotAcceptable,\n  HttpNotFound,\n  HttpPayloadTooLarge,\n  HttpPaymentRequired,\n  HttpPreconditionFailed,\n  HttpPreconditionRequired,\n  HttpProxyAuthenticationRequired,\n  HttpRangeNotSatisfiable,\n  HttpRequestHeaderFieldsTooLarge,\n  HttpRequestTimeout,\n  HttpTooEarly,\n  HttpTooManyRequests,\n  HttpUnauthorized,\n  HttpUnavailableForLegalReasons,\n  HttpUnprocessableEntity,\n  HttpUnsupportedMediaType,\n  HttpUpgradeRequired,\n  HttpUriTooLong,\n} from '../client';\nimport {\n  HttpBadGateway,\n  HttpGatewayTimeout,\n  HttpInsufficientStorage,\n  HttpInternalServerError,\n  HttpLoopDetected,\n  HttpNetworkAuthenticationRequired,\n  HttpNotExtended,\n  HttpNotImplemented,\n  HttpServiceUnavailable,\n  HttpVariantAlsoNegotiates,\n  HttpVersionNotSupported,\n} from '../server';\n\nexport const statusMap = {\n  400: HttpBadRequest,\n  401: HttpUnauthorized,\n  402: HttpPaymentRequired,\n  403: HttpForbidden,\n  404: HttpNotFound,\n  405: HttpMethodNotAllowed,\n  406: HttpNotAcceptable,\n  407: HttpProxyAuthenticationRequired,\n  408: HttpRequestTimeout,\n  409: HttpConflict,\n  410: HttpGone,\n  411: HttpLengthRequired,\n  412: HttpPreconditionFailed,\n  413: HttpPayloadTooLarge,\n  414: HttpUriTooLong,\n  415: HttpUnsupportedMediaType,\n  416: HttpRangeNotSatisfiable,\n  417: HttpExpectationFailed,\n  418: HttpImATeapot,\n  421: HttpMisdirectedRequest,\n  422: HttpUnprocessableEntity,\n  423: HttpLocked,\n  424: HttpFailedDependency,\n  425: HttpTooEarly,\n  426: HttpUpgradeRequired,\n  428: HttpPreconditionRequired,\n  429: HttpTooManyRequests,\n  431: HttpRequestHeaderFieldsTooLarge,\n  451: HttpUnavailableForLegalReasons,\n  500: HttpInternalServerError,\n  501: HttpNotImplemented,\n  502: HttpBadGateway,\n  503: HttpServiceUnavailable,\n  504: HttpGatewayTimeout,\n  505: HttpVersionNotSupported,\n  506: HttpVariantAlsoNegotiates,\n  507: HttpInsufficientStorage, // webdav\n  508: HttpLoopDetected, // webdav\n  // Well-known (unassigned by ietf https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)\n  // 509: 'BandwidthLimitExceeded',\n  510: HttpNotExtended,\n  511: HttpNetworkAuthenticationRequired,\n  // Well-known Cloudflare (unassigned by ietf https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)\n  /*\n  520: 'Unknown Error',\n  521: 'Web Server Is Down',\n  522: 'Connection Timed Out',\n  523: 'Origin Is Unreachable',\n  524: 'A Timeout Occurred',\n  525: 'SSL Handshake Failed',\n  526: 'Invalid SSL Certificate',\n   */\n};\n","import { HttpClientException } from '../base/HttpClientException';\nimport { HttpException } from '../base/HttpException';\nimport { HttpServerException } from '../base/HttpServerException';\nimport { statusMap } from '../status';\nimport { isHttpErrorStatusCode } from '../typeguards/isHttpErrorStatusCode';\nimport type { AssignedErrorStatusCodes } from '../types/AssignedErrorStatusCodes';\nimport type {\n  HttpExceptionFromStatus,\n  HttpExceptionParamsFromStatus,\n} from '../types/FromStatusCode';\nimport type { HttpErrorStatusCodeOrNumber } from '../types/HttpErrorStatusCodeOrNumber';\n\n/**\n * Create a concrete http exception object from a given http status code.\n *\n * If the status does not have an assigned ietf class, it will default\n * to either HttpClientException or HttpServerException based on ranges\n * (client: 400-499, server: 500-599).\n *\n * At last resort, if the provided status does not meet error range requirements\n * (400-599), it will create an HttpException with the out-of-scope code (ie: 100, 300, 1099...)\n *\n * @param statusCode http status code between 400-599\n * @param msgOrParams either a message or an object containing HttpExceptionParams\n */\n\nexport const createHttpException = <T extends HttpErrorStatusCodeOrNumber>(\n  statusCode: T,\n  msgOrParams?: HttpExceptionParamsFromStatus<T> | string\n): HttpExceptionFromStatus<T> => {\n  if (isHttpErrorStatusCode<AssignedErrorStatusCodes>(statusCode)) {\n    const cls = statusMap?.[statusCode];\n    if (cls) {\n      return new cls(msgOrParams) as HttpExceptionFromStatus<T>;\n    }\n    return (\n      statusCode < 500\n        ? new HttpClientException(statusCode, msgOrParams)\n        : new HttpServerException(statusCode, msgOrParams)\n    ) as HttpExceptionFromStatus<typeof statusCode>;\n  }\n  return new HttpException(statusCode, msgOrParams) as HttpExceptionFromStatus<\n    typeof statusCode\n  >;\n};\n"]}