JavaScript Node.js Basics Handling Errors in Node Handling Errors in Node

Challenge doesn't let me pass, the code looks correct

Is there something I'm missing?

app.js
const https = require("https");

var request = https.get("https://teamtreehouse.com/chalkers.json", response => {
  console.log(response.statusCode);
});


request.on('error', error => console.error('${error.message}'));

1 Answer

Raffael Dettling
Raffael Dettling
31,046 Points

You dont need the $ sign and the quotes

request.on('error', error => console.error(error.message));