Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Node.js Basics 2017 Handling Errors in Node Handling Status Code Errors

NAHIMA ABEA
NAHIMA ABEA
5,728 Points

Error 401 treehouse issues

treehouse:~/workspace$ node app.js chalkers-not
There was an error getting a profile for chalkers-not (401)
treehouse:~/workspace$ ^C

From halfway through until now keeps giving me this. I think this is more on the backend of the treehouse and the code is exactly like the lesson but keep getting this. Strange thing is that it works on the quizzes but not on the virtual machine one

1 Answer

Steven Parker
Steven Parker
231,261 Points

Treehouse seems to have relocated the profiles since the video was made, use this new location in the request:

https.get(`https://teamtreehouse.com/profiles/${username}.json`, ...

You might want to let the Support staff know so they could at least put a mention in the teachers notes.

NAHIMA ABEA
NAHIMA ABEA
5,728 Points

Yeah, because when working with all of Chalker's videos I kept getting "Unauthorized" to access profiles. Just finished the Node.Js project and still says unauthorized access. I will let the support staff aware. Thank you!