Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Node.js Basics!
You have completed Node.js Basics!
Preview
We can use a try catch block to watch for synchronous errors in Node.js.
Documentation
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
it says that there is another node error
where we can use a try catch block.
0:00
This error is a parsing error.
0:03
Before we were given JSON we
could work with by the API.
0:05
Requesting a profile that doesn't
exist will return an invalid response,
0:09
which will cause an error
when we try to parse it.
0:13
Let's try running the program
with a fake username.
0:22
Node app.js veggiemikel.
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up