Now we have some error handling in place and we can go ahead and test that our app still works. From the Terminal we'll rerun the previous command, and we still get a temperature 28.71:

Back inside of Atom, we'll trash some of the data by removing the comma, saving the file:
request({
url: 'https://api.forecast.io/forecast/4a04d1c42fd9d32c97a2c291a32d5e2d/39.9396284-75.18663959999999',
json: true
}, (error, response, body) => {
if (error){
console.log('Unable to connect to Forecast.io server.');
} else if (response.statusCode === 400) {
console.log('Unable to fetch weather.');
} else if (response.statusCode === 200) {
console.log(body.currently.temparature);
}
});
When we rerun it from the Terminal, this time, we would expect Unable to fetch weather. to print to the screen, and when I rerun the app that is exactly what we get, as shown here:

Now, let's add the comma back in and test our last part of the code. To test the if error, we can test that by removing something like the dot from forecast.io:
request({
url: 'https://api.forecastio/forecast/4a04d1c42fd9d32c97a2c291a32d5e2d/39.9396284,-75.18663959999999',
json: true
}, (error, response, body) => {
We can rerun the app, and we see Unable to connect to Forecast.io server.:

All of our error handling works great, and if there is no errors the proper temperature prints to the screen, which is fantastic.