The url https://restcountries.com/v3.1/all is completely down for the level 2 course. Getting either a 502 bad gateway error, or the connection just gets terminated. I was thinking of hardcoding the countries in a code node like this:
Hello @pauljhollis ! When youāre calling the url thru n8n, are you following this? {āmessageā:āāfieldsā query not specified or youāre requesting more than 10 fieldsā,āstatusā:400}
It works for me upon accessing it, are you self-hosted?
welcome to the n8n community @pauljhollis
Iād say your workaround is reasonable for the Level 2 course. I couldnāt find official docs that confirm how the exam handles that specific API, but in most n8n exercises what matters is the data structure, not the source URL itself. Since your Code node keeps the expected fields (name.common, region, subregion), it should be fine for lessons focused on filtering, merging, or expressions. If a later exercise specifically tests the HTTP Request node, you can swap back to a live API then. As another option, you could use any public countries dataset or a local JSON file with the same structure.
Thanks for the reply @achamm ! It does seem to be working today, but yesterday, I was consistently getting 502 Bad Gateway errors, or just regular connection timeouts. Sometimes it worked, but most it didnāt. I tried using curl -s -o /dev/null -w "%{http_code}" "https://restcountries.com/v3.1/all" a few times yesterday outside of trying in n8n, and it always returned 502. But, today seems to be okay! it must have just been having some issues!
Hi @tamy.santos , thanks for the reply! It does seem to be working today, but appreciate the information. If it keeps happening and I have a problem finishing the exercise, Iāll give this a shot!