[Solved] Fetch request failing: getaddrinfo EAI_AGAIN

Hi guys,

I’ve been toying with a botkit starter kit and got it to work quite well until today: do you know why my fetch request are failing today with this getaddringo error?
Looks like a DNS issue on Glitch servers, but I may have missed something.
My code is nothing fancy:
fetch(‘https://opentdb.com/api.php?amount=1&difficulty=medium&type=multiple’)
.then(function (res) {return res.json()})
.then(function(json) {trivia = json.results[0]})

And it worked well all past week, I don’t understand why it started failing today…
Any idea or advice on how to fix this issue would be really appreciated!

Hi @abencheikh,

can you please tell us the project name, so that I can give a closer look?

Thanks!

It looks like the problem has something to do with DNS for opentdb.com. If you go to the Glitch console and ping another server, it works, but for some reason opentdb.com comes back with an unknown host error.

The problem seems to have resolved itself.

Thanks a lot guys! I guess I’ll never now what happened exactly, but yes the issue has solved itself: thanks for your assistance!