Previously, when generating error responses, TokenError was not
passed the HTTP status code that was passed to the error response
handler (parseErrorResponse). This resulted in every kind of error
being treated as a 500 Internal Server Error. This commit fixes
this by passing on the returned status code from the OAuth call.
Coverage remained the same at 100.0% when pulling 86692c124bf75acdb8c6a89e98edcc3168084925 on getsnoopy:pass-tokenerror-status into e20f26aad60ed54f0e7952928cbb64979ef8da2b on jaredhanson:master.
Previously, when generating error responses,
TokenError
was not passed the HTTP status code that was passed to the error response handler (parseErrorResponse
). This resulted in every kind of error being treated as a 500 Internal Server Error. This commit fixes this by passing on the returned status code from the OAuth call.Fixes #127