Skip to content

Instantly share code, notes, and snippets.

@fubar
Created March 5, 2018 22:07
Show Gist options
  • Select an option

  • Save fubar/9ec5600fa5f92b0d73cad2da0ea4b9fa to your computer and use it in GitHub Desktop.

Select an option

Save fubar/9ec5600fa5f92b0d73cad2da0ea4b9fa to your computer and use it in GitHub Desktop.
Adds type-hinting for the restify-errors library
const errors = require('restify-errors');
/**
* The purpose of this list is to add type-hinting for the restify-errors library.
* See https://github.com/restify/errors
*
* @type {Object}
*/
module.exports = Object.freeze({
BadDigestError: errors.BadDigestError,
BadGatewayError: errors.BadGatewayError,
BadMethodError: errors.BadMethodError,
BadRequestError: errors.BadRequestError,
BandwidthLimitExceededError: errors.BandwidthLimitExceededError,
ConflictError: errors.ConflictError,
ExpectationFailedError: errors.ExpectationFailedError,
FailedDependencyError: errors.FailedDependencyError,
ForbiddenError: errors.ForbiddenError,
GatewayTimeoutError: errors.GatewayTimeoutError,
GoneError: errors.GoneError,
HttpError: errors.HttpError,
HttpVersionNotSupportedError: errors.HttpVersionNotSupportedError,
ImATeapotError: errors.ImATeapotError,
InsufficientStorageError: errors.InsufficientStorageError,
InternalError: errors.InternalError,
InternalServerError: errors.InternalServerError,
InvalidArgumentError: errors.InvalidArgumentError,
InvalidContentError: errors.InvalidContentError,
InvalidCredentialsError: errors.InvalidCredentialsError,
InvalidHeaderError: errors.InvalidHeaderError,
InvalidVersionError: errors.InvalidVersionError,
LengthRequiredError: errors.LengthRequiredError,
LockedError: errors.LockedError,
LoopDetectedError: errors.LoopDetectedError,
MethodNotAllowedError: errors.MethodNotAllowedError,
MisdirectedRequestError: errors.MisdirectedRequestError,
MissingParameterError: errors.MissingParameterError,
NetworkAuthenticationRequiredError: errors.NetworkAuthenticationRequiredError,
NotAcceptableError: errors.NotAcceptableError,
NotAuthorizedError: errors.NotAuthorizedError,
NotExtendedError: errors.NotExtendedError,
NotFoundError: errors.NotFoundError,
NotImplementedError: errors.NotImplementedError,
PayloadTooLargeError: errors.PayloadTooLargeError,
PaymentRequiredError: errors.PaymentRequiredError,
PreconditionFailedError: errors.PreconditionFailedError,
PreconditionRequiredError: errors.PreconditionRequiredError,
ProxyAuthenticationRequiredError: errors.ProxyAuthenticationRequiredError,
RangeNotSatisfiableError: errors.RangeNotSatisfiableError,
RequestExpiredError: errors.RequestExpiredError,
RequestHeaderFieldsTooLargeError: errors.RequestHeaderFieldsTooLargeError,
RequestThrottledError: errors.RequestThrottledError,
RequestTimeoutError: errors.RequestTimeoutError,
ResourceNotFoundError: errors.ResourceNotFoundError,
RestError: errors.RestError,
ServiceUnavailableError: errors.ServiceUnavailableError,
TooManyRequestsError: errors.TooManyRequestsError,
UnauthorizedError: errors.UnauthorizedError,
UnavailableForLegalReasonsError: errors.UnavailableForLegalReasonsError,
UnorderedCollectionError: errors.UnorderedCollectionError,
UnprocessableEntityError: errors.UnprocessableEntityError,
UnsupportedMediaTypeError: errors.UnsupportedMediaTypeError,
UpgradeRequiredError: errors.UpgradeRequiredError,
UriTooLongError: errors.UriTooLongError,
VariantAlsoNegotiatesError: errors.VariantAlsoNegotiatesError,
WrongAcceptError: errors.WrongAcceptError
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment