Handling Parsing Errors with try and catch3:28 with Andrew Chalkley
We've dealt with connection errors but there are other things that could go wrong. Let's see if we can catch the other errors that could happen.
app.js, to run
printError() if there is an error on a request, use the following:
request.on( 'error', error => printError(error) );
You need to sign up for Treehouse in order to download course files.Sign up