Hi. I use the api in nuxt. I make a request through composable useFetch, but I get an error when starting the application. FetchError: [GET] "https://api.themoviedb.org/3/movie/popular?language=en": fetch failed cause: TypeError: fetch failed cause: Error: connect ECONNREFUSED 127.0.0.1:443 I tried to make a request with jsonplaceholder and everything works correctly. What could be the problem? Thanks for the answer.
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on сакавік 14, 2024 at 11:11 AM
Hi @vlsv,
Something in your environment is returning a localhost address (
127.0.0.1
) as the IP address forapi.themoviedb.org
.You could try changing nameservers wherever this environment is to either:
And see if the problem corrects itself. FYI: we have seen Cloudflare not always return the correct addresses so Google or Quad9 are your best bets.
Reply by vlsv
on сакавік 14, 2024 at 6:04 PM
Unfortunately, these didn't help. There is no such problem when between page navigations, only when starting the app...