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

JavaScript Asynchronous Programming with JavaScript Understanding Promises Handle Multiple Promises with Promise.all

wikiUrl api link is not working

https://en.wikipedia.org/api/rest_v1/page/summary/ -- this link results in:

{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/not_found","title":"Not found.","method":"get","detail":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot GET /en.wikipedia.org/v1/page/summary/</pre>\n</body>\n</html>\n","uri":"/en.wikipedia.org/v1/page/summary/"}

So all my astronaut entries take the else branch (Results unavailable)...

Michael Kristensen
Michael Kristensen
Full Stack JavaScript Techdegree Student 20,476 Points

The point about the way the link is constructed in the program, is that it takes the names from the AstrosUrl, which is the list of names of people currently in space, and appends it to the WikiUrl link, and takes the article data from that, so any request for the WikiUrl would be rewritten as (wikiUrl + person.name) -https://en.wikipedia.org/api/rest_v1/page/summary/person.name - For example:

and these links contain the information about the astronauts to build the section HTML from.

1 Answer

Lee Vaughn
.a{fill-rule:evenodd;}techdegree seal-36
Lee Vaughn
Treehouse Teacher

Hi Daniel Ahn!

We can't really talk specifics without being able to see your code but the URL you are linking above is only part of what you need to get data from the API. You will want to add the astronaut name to the end so that what you are searching for is defined.