Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Asynchronous Programming with JavaScript Asynchronous JavaScript with Callbacks Implement a Callback

Seokhyun Wie
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Seokhyun Wie
Full Stack JavaScript Techdegree Graduate 21,594 Points

Two astronauts have the same names on Wikipedia. The XHR prints error.

The method from the lesson only uses name property to call json files of astronauts from Wiki. (I don't know if they are other ways to call API) It causes error because there are some other people have the same name of two astronauts, Andrew Morgan, Aleksandr Skvortsov (present, 25.12.2019). I assume that not only me, but many treehouse students might have issues because of it. Please fix it as soon as possible. Thanks and happy Christmas!

1 Answer

I noticed this as well. It looks like the API is searching for "Andrew Morgan" on Wikipedia and there are several people of that name, which suggests that the fault lies with Open Notify rather than Treehouse. The code the works for the rest of the astronauts; the API is just not being specific with its search terms. It should be searching for Andrew R. Morgan.

If anything, this demonstrates how fetching data can have its drawbacks!