Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got doesn't report errors #12

Closed
nateGeorge opened this issue Jul 15, 2016 · 1 comment
Closed

Got doesn't report errors #12

nateGeorge opened this issue Jul 15, 2016 · 1 comment

Comments

@nateGeorge
Copy link

nateGeorge commented Jul 15, 2016

When there is an error (i.e., I was over my quota for searches) it is not reported to the console.

The 'got' call should look more like this:

got('todomvc.com')
    .then(response => {
        console.log(response.body);
        //=> '<!doctype html> ...' 
    })
    .catch(error => {
        console.log(error.response.body);
        //=> 'Internal server error ...' 
    });

https://www.npmjs.com/package/got

@vadimdemedes
Copy link
Owner

See #13 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants