Skip to content

Commit

Permalink
Fix #1366 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Morita0711 committed Apr 13, 2018
1 parent 02265d7 commit 9150200
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,10 @@ You should use both `deadline` and `response` timeouts. This way you can use a s
response: 5000, // Wait 5 seconds for the server to start sending,
deadline: 60000, // but allow 1 minute for the file to finish loading.
})
.then(function(res) {
if (err.timeout) { /* timed out! */ }
.then(res => {
/* responded in time */
}, err => {
if (err.timeout) { /* timed out! */ } else { /* other error */ }
});

Timeout errors have a `.timeout` property.
Expand Down

0 comments on commit 9150200

Please sign in to comment.