Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-error-es2015

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-error-es2015

ES2105 JavaScript Error classes for all HTTP Errors

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

http-error-es2015

Travis npm

A library with ES2015 error classes for all HTTP Errors

Install

npm install http-error-es2015

Example

import BadRequestError from 'http-error-es2015/errors/BadRequestError'

const err = new BadRequestError('message')

If you use an environment which does not support the Reflect API you have to polyfill the functionality.

List of errors

CodeFunction
400BadRequestError
401UnauthorizedError
402PaymentRequiredError
403ForbiddenError
404NotFoundError
405MethodNotAllowedError
406NotAcceptableError
407ProxyAuthenticationRequiredError
408RequestTimeoutError
409ConflictError
410GoneError
411LengthRequiredError
412PreconditionFailedError
413PayloadTooLargeError
414UriTooLongError
415UnsupportedMediaTypeError
416RangeNotSatisfiableError
417ExpectationFailedError
421MisdirectedRequestError
422UnprocessableEntityError
423LockedError
424FailedDependencyError
426UpgradeRequiredError
428PreconditionRequiredError
429TooManyRequestsError
431RequestHeaderFieldsTooLargeError
451UnavailableForLegalReasonsError
500InternalServerError
501NotImplementedError
502BadGatewayError
503ServiceUnavailableError
504GatewayTimeoutError
505HttpVersionNotSupportedError
506VariantAlsoNegotiatesError
507InsufficientStorageError
508LoopDetectedError
510NotExtendedError
511NetworkAuthenticationRequiredError

License

MIT

Keywords

FAQs

Package last updated on 26 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc