Skip to content

Commit

Permalink
Merge pull request pagekit#1 from jarvelov/jarvelov-patch-1
Browse files Browse the repository at this point in the history
Handle rejected promises
  • Loading branch information
jarvelov authored Jun 7, 2017
2 parents 28a7952 + 2047ac9 commit 0d81d7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function (context) {
}

function Client(request) {
return new Promise(resolve => {
return new Promise((resolve, reject) => {

function exec() {

Expand Down Expand Up @@ -44,7 +44,7 @@ export default function (context) {
});
});

when(response, resolve);
when(response, resolve, reject);

return;
}
Expand Down

0 comments on commit 0d81d7d

Please sign in to comment.