diff --git a/readme.md b/readme.md index 078893d..43ea0f6 100644 --- a/readme.md +++ b/readme.md @@ -36,10 +36,15 @@ got('todomvc.com', (error, body, response) => { }); // Promise mode -got('todomvc.com').then(response => { - console.log(response.body); - //=> ' ...' -}); +got('todomvc.com') + .then(response => { + console.log(response.body); + //=> ' ...' + }) + .catch(error => { + console.log(error.response.body); + //=> 'Internal server error ...' + }); // Stream mode got.stream('todomvc.com').pipe(fs.createWriteStream('index.html'));