Skip to content

Commit

Permalink
fix throwing the timeout error
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaham committed May 24, 2019
1 parent eba0f77 commit 5d049ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/helpers/waiting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ function timeoutPromise(ms, promise, description) {
const timeout = new Promise((resolve, reject) => {
const id = setTimeout(() => {
clearTimeout(id);
reject(new Error({ timeout: true, errorMessage: description }));
const error = new Error(description);
error.timeout = true;
reject(error);
}, ms);
});

Expand Down

0 comments on commit 5d049ac

Please sign in to comment.