Skip to content

Commit

Permalink
Handle 405 and 501 error messages. Fixes #275.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick F. Kautz IV committed Jul 16, 2015
1 parent 3609185 commit 6d8ff19
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 6d8ff19

Please sign in to comment.