Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
fix(api-response): throw error happen out of request lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 29, 2017
1 parent 132f433 commit e4c35c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ApiClient/Request.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ module.exports = function (BaseRequest, Response) {
try {
response = await this._agent
} catch (error) {
/**
* Throw error when not a response
* error
*/
if (!error.response) {
throw error
}
response = error.response
}

Expand Down

0 comments on commit e4c35c3

Please sign in to comment.