From 6d8ff193661de739da373240f54301fff8c4a737 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Thu, 16 Jul 2015 15:47:54 -0700 Subject: [PATCH] Handle 405 and 501 error messages. Fixes #275. --- src/main/xml-parsers.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/xml-parsers.js b/src/main/xml-parsers.js index 43e0a7df..a2d9f105 100644 --- a/src/main/xml-parsers.js +++ b/src/main/xml-parsers.js @@ -42,6 +42,12 @@ var parseError = (response, cb) => { } else if (response.statusCode === 404) { e.code = 'NotFound' e.message = 'Not Found' + } else if (response.statusCode === 405) { + e.code = 'MethodNotAllowed' + e.message = 'Method Not Allowed' + } else if (response.statusCode === 501) { + e.code = 'MethodNotAllowed' + e.message = 'Method Not Allowed' } else { e.code = 'UnknownError' e.message = `${response.statusCode}`