From 3e5df1b6addcdbb32fad36332366edce80689bc5 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Tue, 6 Jan 2015 07:18:22 -0700 Subject: [PATCH] added exceptions for HTTPS/shield related statuses --- src/lib/errors.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/lib/errors.js b/src/lib/errors.js index 728c1f64c..dfc99c0f1 100644 --- a/src/lib/errors.js +++ b/src/lib/errors.js @@ -80,19 +80,19 @@ _.inherits(errors.RequestTypeError, ErrorAbstract); var statusCodes = { /** - * Service Unavailable + * ServiceUnavailable * @param {String} [msg] - An error message that will probably end up in a log. */ 503: 'Service Unavailable', /** - * Internal Server Error + * InternalServerError * @param {String} [msg] - An error message that will probably end up in a log. */ 500: 'Internal Server Error', /** - * Precondition Failed + * PreconditionFailed * @param {String} [msg] - An error message that will probably end up in a log. */ 412: 'Precondition Failed', @@ -104,25 +104,31 @@ var statusCodes = { 409: 'Conflict', /** - * Forbidden + * AuthorizationException * @param {String} [msg] - An error message that will probably end up in a log. */ - 403: 'Forbidden', + 403: 'Authorization Exception', /** - * Not Found + * NotFound * @param {String} [msg] - An error message that will probably end up in a log. */ 404: 'Not Found', /** - * Bad Request + * AuthenticationException + * @param {String} [msg] - An error message that will probably end up in a log. + */ + 401: 'Authentication Exception', + + /** + * BadRequest * @param {String} [msg] - An error message that will probably end up in a log. */ 400: 'Bad Request', /** - * Moved Permanently + * MovedPermanently * @param {String} [msg] - An error message that will probably end up in a log. */ 301: 'Moved Permanently' @@ -138,4 +144,4 @@ _.each(statusCodes, function (name, status) { _.inherits(StatusCodeError, ErrorAbstract); errors[className] = StatusCodeError; errors[status] = StatusCodeError; -}); +}); \ No newline at end of file