/node-http-error

Basic HTTP errors with status codes for Node.js

Primary LanguageTypeScriptMIT LicenseMIT

node-http-error npm CI CD

Custom HTTP errors with status codes for Node.js, extends SuperError.

API

  • HTTPError — Generic HTTP error
  • HTTPBadRequestErrorHTTPError with status 400
  • HTTPUnauthorizedErrorHTTPError with status 401
  • HTTPPaymentRequiredErrorHTTPError with status 402
  • HTTPForbiddenErrorHTTPError with status 403
  • HTTPNotFoundErrorHTTPError with status 404
  • HTTPMethodNotAllowedErrorHTTPError with status 405
  • HTTPNotAcceptableErrorHTTPError with status 406
  • HTTPProxyAuthenticationRequiredErrorHTTPError with status 407
  • HTTPRequestTimeoutErrorHTTPError with status 408
  • HTTPConflictErrorHTTPError with status 409
  • HTTPGoneErrorHTTPError with status 410
  • HTTPLengthRequiredErrorHTTPError with status 411
  • HTTPPreconditionFailedErrorHTTPError with status 412
  • HTTPPayloadTooLargeErrorHTTPError with status 413
  • HTTPUriTooLongErrorHTTPError with status 414
  • HTTPUnsupportedMediaTypeErrorHTTPError with status 415
  • HTTPRangeNotSatisfiableErrorHTTPError with status 416
  • HTTPExpectationFailedErrorHTTPError with status 417
  • HTTPImATeapotErrorHTTPError with status 418
  • HTTPMisdirectedRequestErrorHTTPError with status 421
  • HTTPUnprocessableEntityErrorHTTPError with status 422
  • HTTPLockedErrorHTTPError with status 423
  • HTTPFailedDependencyErrorHTTPError with status 424
  • HTTPUnorderedCollectionErrorHTTPError with status 425
  • HTTPUpgradeRequiredErrorHTTPError with status 426
  • HTTPPreconditionRequiredErrorHTTPError with status 428
  • HTTPTooManyRequestsErrorHTTPError with status 429
  • HTTPRequestHeaderFieldsTooLargeErrorHTTPError with status 431
  • HTTPUnavailableForLegalReasonsErrorHTTPError with status 451
  • HTTPInternalServerErrorHTTPError with status 500
  • HTTPNotImplementedErrorHTTPError with status 501
  • HTTPBadGatewayErrorHTTPError with status 502
  • HTTPServiceUnavailableErrorHTTPError with status 503
  • HTTPGatewayTimeoutErrorHTTPError with status 504
  • HTTPHttpVersionNotSupportedErrorHTTPError with status 505
  • HTTPVariantAlsoNegotiatesErrorHTTPError with status 506
  • HTTPInsufficientStorageErrorHTTPError with status 507
  • HTTPLoopDetectedErrorHTTPError with status 508
  • HTTPBandwidthLimitExceededErrorHTTPError with status 509
  • HTTPNotExtendedErrorHTTPError with status 510
  • HTTPNetworkAuthenticationRequireErrorHTTPError with status 511