Hey @poulamic,
the error you are getting can originate from several reasons. Since you only gave a small snippet of your code, I can;t really be sure where the problem originates from.
Have you made sure that the url you are sending in the fetch request is valid?
Have you configured the fetch request appropriately based on Twitch’s API (type of request, headers, API key)?
I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
I am redoing my twitch project, and I ran into a similar issue. I believe since fetch uses Promises, you don’t need the callback part at the end. Here is my working fetch code:
let data = await Promise.all([
fetch(`https://wind-bow.glitch.me/twitch-api/channels/${streamer}`).then((response) => response.json()),
fetch(`https://wind-bow.glitch.me/twitch-api/streams/${streamer}`).then((response) => response.json()),
])