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!
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
I code along with teacher and I received massage: There's an error getting the profile for chalkers (ok). I guess it means something wrong with the first try.. catch... so it triggered the const message. But the http.STATUS_CODES shows ok. How can I debug the error?
Rohald van MerodeTreehouse Staff
Hi Yiling Lin,
Looking at the finished code in the project files it looks like the
else block is running on your end. Based on that I think there could be something wrong with the conditional you have that checks if the statusCode is 200. Maybe there's a typo in that conditional causing the condition to evaluate to false?
If that isn't the case could you please share your code and I'd be happy to have another look 🙂
Hi Rohald, Thank you a lot for the hint! It's really just a small typo that I didn't notice. Thanks!!