mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-12 12:10:44 +08:00
fix restify error classes
* add missing restify error classes * overloaded constructor * more constructor tests
This commit is contained in:
+111
-17
@@ -99,23 +99,117 @@ server.del( /(.*)/, send);
|
||||
server.get( /(.*)/, send);
|
||||
server.head(/(.*)/, send);
|
||||
|
||||
new restify.ConflictError("test");
|
||||
new restify.InvalidArgumentError("message");
|
||||
new restify.RestError("message");
|
||||
new restify.BadDigestError("message");
|
||||
new restify.BadMethodError("message");
|
||||
new restify.BadRequestError('test');
|
||||
new restify.InternalError("message");
|
||||
new restify.InvalidContentError("message");
|
||||
new restify.InvalidCredentialsError("message");
|
||||
new restify.InvalidHeaderError("message");
|
||||
new restify.InvalidVersionError("message");
|
||||
new restify.MissingParameterError("message");
|
||||
new restify.NotAuthorizedError("message");
|
||||
new restify.RequestExpiredError("jjmessage");
|
||||
new restify.RequestThrottledError("message");
|
||||
new restify.ResourceNotFoundError("message");
|
||||
new restify.WrongAcceptError("message");
|
||||
|
||||
new restify.BadRequestError();
|
||||
new restify.UnauthorizedError();
|
||||
new restify.PaymentRequiredError();
|
||||
new restify.ForbiddenError();
|
||||
new restify.NotFoundError();
|
||||
new restify.MethodNotAllowedError();
|
||||
new restify.NotAcceptableError();
|
||||
new restify.ProxyAuthenticationRequiredError();
|
||||
new restify.RequestTimeoutError();
|
||||
new restify.ConflictError();
|
||||
new restify.GoneError();
|
||||
new restify.LengthRequiredError();
|
||||
new restify.RequestEntityTooLargeError();
|
||||
new restify.RequesturiTooLargeError();
|
||||
new restify.UnsupportedMediaTypeError();
|
||||
new restify.RequestedRangeNotSatisfiableError();
|
||||
new restify.ExpectationFailedError();
|
||||
new restify.ImATeapotError();
|
||||
new restify.UnprocessableEntityError();
|
||||
new restify.LockedError();
|
||||
new restify.FailedDependencyError();
|
||||
new restify.UnorderedCollectionError();
|
||||
new restify.UpgradeRequiredError();
|
||||
new restify.PreconditionRequiredError();
|
||||
new restify.TooManyRequestsError();
|
||||
new restify.RequestHeaderFieldsTooLargeError();
|
||||
new restify.InternalServerError();
|
||||
new restify.NotImplementedError();
|
||||
new restify.BadGatewayError();
|
||||
new restify.ServiceUnavailableError();
|
||||
new restify.GatewayTimeoutError();
|
||||
new restify.HttpVersionNotSupportedError();
|
||||
new restify.VariantAlsoNegotiatesError();
|
||||
new restify.InsufficientStorageError();
|
||||
new restify.BandwidthLimitExceededError();
|
||||
new restify.NotExtendedError();
|
||||
new restify.NetworkAuthenticationRequiredError();
|
||||
new restify.RestError();
|
||||
|
||||
new restify.BadRequestError(new Error(), 'foo');
|
||||
new restify.UnauthorizedError(new Error(), 'foo');
|
||||
new restify.PaymentRequiredError(new Error(), 'foo');
|
||||
new restify.ForbiddenError(new Error(), 'foo');
|
||||
new restify.NotFoundError(new Error(), 'foo');
|
||||
new restify.MethodNotAllowedError(new Error(), 'foo');
|
||||
new restify.NotAcceptableError(new Error(), 'foo');
|
||||
new restify.ProxyAuthenticationRequiredError(new Error(), 'foo');
|
||||
new restify.RequestTimeoutError(new Error(), 'foo');
|
||||
new restify.ConflictError(new Error(), 'foo');
|
||||
new restify.GoneError(new Error(), 'foo');
|
||||
new restify.LengthRequiredError(new Error(), 'foo');
|
||||
new restify.RequestEntityTooLargeError(new Error(), 'foo');
|
||||
new restify.RequesturiTooLargeError(new Error(), 'foo');
|
||||
new restify.UnsupportedMediaTypeError(new Error(), 'foo');
|
||||
new restify.RequestedRangeNotSatisfiableError(new Error(), 'foo');
|
||||
new restify.ExpectationFailedError(new Error(), 'foo');
|
||||
new restify.ImATeapotError(new Error(), 'foo');
|
||||
new restify.UnprocessableEntityError(new Error(), 'foo');
|
||||
new restify.LockedError(new Error(), 'foo');
|
||||
new restify.FailedDependencyError(new Error(), 'foo');
|
||||
new restify.UnorderedCollectionError(new Error(), 'foo');
|
||||
new restify.UpgradeRequiredError(new Error(), 'foo');
|
||||
new restify.PreconditionRequiredError(new Error(), 'foo');
|
||||
new restify.TooManyRequestsError(new Error(), 'foo');
|
||||
new restify.RequestHeaderFieldsTooLargeError(new Error(), 'foo');
|
||||
new restify.InternalServerError(new Error(), 'foo');
|
||||
new restify.NotImplementedError(new Error(), 'foo');
|
||||
new restify.BadGatewayError(new Error(), 'foo');
|
||||
new restify.ServiceUnavailableError(new Error(), 'foo');
|
||||
new restify.GatewayTimeoutError(new Error(), 'foo');
|
||||
new restify.HttpVersionNotSupportedError(new Error(), 'foo');
|
||||
new restify.VariantAlsoNegotiatesError(new Error(), 'foo');
|
||||
new restify.InsufficientStorageError(new Error(), 'foo');
|
||||
new restify.BandwidthLimitExceededError(new Error(), 'foo');
|
||||
new restify.NotExtendedError(new Error(), 'foo');
|
||||
new restify.NetworkAuthenticationRequiredError(new Error(), 'foo');
|
||||
new restify.RestError(new Error(), 'foo');
|
||||
|
||||
new restify.PreconditionFailedError(new Error(), 'foo');
|
||||
new restify.BadDigestError(new Error(), 'foo');
|
||||
new restify.BadMethodError(new Error(), 'foo');
|
||||
new restify.InternalError(new Error(), 'foo');
|
||||
new restify.InvalidArgumentError(new Error(), 'foo');
|
||||
new restify.InvalidContentError(new Error(), 'foo');
|
||||
new restify.InvalidCredentialsError(new Error(), 'foo');
|
||||
new restify.InvalidHeaderError(new Error(), 'foo');
|
||||
new restify.InvalidVersionError(new Error(), 'foo');
|
||||
new restify.MissingParameterError(new Error(), 'foo');
|
||||
new restify.NotAuthorizedError(new Error(), 'foo');
|
||||
new restify.RequestExpiredError(new Error(), 'foo');
|
||||
new restify.RequestThrottledError(new Error(), 'foo');
|
||||
new restify.ResourceNotFoundError(new Error(), 'foo');
|
||||
new restify.WrongAcceptError(new Error(), 'foo');
|
||||
|
||||
new restify.PreconditionFailedError();
|
||||
new restify.BadDigestError();
|
||||
new restify.BadMethodError();
|
||||
new restify.InternalError();
|
||||
new restify.InvalidArgumentError();
|
||||
new restify.InvalidContentError();
|
||||
new restify.InvalidCredentialsError();
|
||||
new restify.InvalidHeaderError();
|
||||
new restify.InvalidVersionError();
|
||||
new restify.MissingParameterError();
|
||||
new restify.NotAuthorizedError();
|
||||
new restify.RequestExpiredError();
|
||||
new restify.RequestThrottledError();
|
||||
new restify.ResourceNotFoundError();
|
||||
new restify.WrongAcceptError();
|
||||
|
||||
|
||||
server.name = "";
|
||||
server.version = "";
|
||||
|
||||
Reference in New Issue
Block a user