Skip to content

Commit

Permalink
Merge pull request #276 from fkautz/pr_out_handle_405_and_501_error_m…
Browse files Browse the repository at this point in the history
…essages_fixes_275
  • Loading branch information
Frederick F. Kautz IV committed Jul 17, 2015
2 parents 586bbaf + 6d8ff19 commit 7406b4e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/xml-parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down

0 comments on commit 7406b4e

Please sign in to comment.