Assistance de TMDB

Hello,

For your information, I am currently receiving several 404 errors even though the URL definitely exists. When I make a request again after that, I get a 200 response just fine.

I don’t think the issue is on my end—I’ve tried with multiple DNS providers (Cloudflare and Google) and I’m getting the same result.

In the error response, I found this:

status: 404,  
  statusText: 'Not Found',  
  headers: Object [AxiosHeaders] {  
    'content-type': 'application/json;charset=utf-8',  
    'transfer-encoding': 'chunked',  
    connection: 'keep-alive',  
    date: 'Sat, 29 Mar 2025 09:50:47 GMT',  
    server: 'openresty',  
    vary: 'Accept-Encoding,accept-encoding, Origin',  
    'x-cache': 'Error from cloudfront',  
    via: '1.1 1675c96d31e7d6eacf2a9135ddb13210.cloudfront.net (CloudFront)',  
    'x-amz-cf-pop': 'LHR50-P2',  
    'alt-svc': 'h3=":443"; ma=86400',  
    'x-amz-cf-id': 'IR8K2gUmCYkfiwhLPUBiLYEuYhKqegbPxQRjO4xZXqR3rznLQVfgGQ==',  
    age: '3'  
  },

8 réponses (sur la page 1 sur 1)

Jump to last post

@TheSizkarn said:
Error 404
Hello,
For your information, I am currently receiving several 404 errors even though the URL definitely exists.
When I make a request again after that, I get a 200 response just fine.

TMDb server error messages have text.
This error response you received appears to have no text.
statusText: 'Not Found',
Here is a list of TMDb error responses.
https://developer.themoviedb.org/docs/errors

I don’t think the issue is on my end—I’ve tried with multiple DNS providers (Cloudflare and Google) and I’m getting the same result.
In the error response, I found this:

status: 404,  
  statusText: 'Not Found',  
  headers: Object [AxiosHeaders] {  
    'content-type': 'application/json;charset=utf-8',  
    'transfer-encoding': 'chunked',  
    connection: 'keep-alive',  
    date: 'Sat, 29 Mar 2025 09:50:47 GMT',  
    server: 'openresty',  
    vary: 'Accept-Encoding,accept-encoding, Origin',  
    'x-cache': 'Error from cloudfront',  
    via: '1.1 1675c96d31e7d6eacf2a9135ddb13210.cloudfront.net (CloudFront)',  
    'x-amz-cf-pop': 'LHR50-P2',  
    'alt-svc': 'h3=":443"; ma=86400',  
    'x-amz-cf-id': 'IR8K2gUmCYkfiwhLPUBiLYEuYhKqegbPxQRjO4xZXqR3rznLQVfgGQ==',  
    age: '3'  
  },

It appears that the 404 error response you received was sent by some system before reaching our servers.
It is possible that this is an issue with Axios.
There have been several issues with axios in the past.
See if these conversations can help you, if it is indeed an issue with Axios.

Axios Issues
https://www.themoviedb.org/talk/63e3d510db154f00812e67c6
https://www.themoviedb.org/talk/6037bbc2afa1b00043a76e2c
https://www.themoviedb.org/talk/5f621eae93388b003864513c
https://www.themoviedb.org/talk/5f55e3dd713ed40037f090d4
https://www.themoviedb.org/talk/5d5901d21749730017dd837a
https://www.themoviedb.org/talk/5bab86480e0a2664d4022f98

Even when not using Axios, I encounter the same issue. I’m sharing the response I get with a simple fetch:

Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'content-type': 'application/json;charset=utf-8',
    'transfer-encoding': 'chunked',
    connection: 'keep-alive',
    date: 'Sat, 29 Mar 2025 14:33:45 GMT',
    server: 'openresty',
    'content-encoding': 'gzip',
    vary: 'Accept-Encoding,accept-encoding, Origin',
    'x-cache': 'Error from cloudfront',
    via: '1.1 6fb11804c1310b9bb47e7088f05a3d58.cloudfront.net (CloudFront)',
    'x-amz-cf-pop': 'CDG50-C1',
    'alt-svc': 'h3=":443"; ma=86400',
    'x-amz-cf-id': 'glgQQYSLCRjcYYV3ZtStJUImT_RdxZMOCBiivfUZwHv-wjy5JH5AUw=='
  },
  body: ReadableStream { locked: false, state: 'readable', supportsBYOB: true },
  bodyUsed: false,
  ok: false,
  redirected: false,
  type: 'basic',
  url: 'https://api.themoviedb.org/3/tv/221440/season/46?language=fr-FR'
}

Once again, when I make another request to the same endpoint with the same ID, I successfully get a 200 response. You can verify that the example endpoint provided above works correctly.

In my code, I’m simply doing this:

const response = await fetch(
            `${TMDB_API_URL}/${season.series.tmdbId}/season/${season.seasonNumber}?language=fr-FR`,
            {
              method: 'GET',
              headers: {
                Authorization: `Bearer ${TMDB_API_TOKEN}`,
              },
            }
)

 if (!response.ok) {
       console.log(response)
       throw new Error(`HTTP error! status: ${response.status}`)
}

const data = await response.json()

This series only has one season, the 46th.
Japan Academy Film Prize Award Ceremony
Https://www.themoviedb.org/tv/221440?language=en-US
And this season 46 only has one episode.
Https://www.themoviedb.org/tv/221440/season/46/translations?language=zh-CN
Try to change in your API Request from fr-FR to zh-CN.

It’s pretty funny to see that a moderator doesn’t even know that the "language" parameter has no impact on the endpoint if its translation isn’t available.

Once again, the 404 occurs randomly on any endpoint of the API, and when I make a new request to the same one without changing anything, I receive a 200.

I’m convinced that the issue isn’t on my end but comes from TMDB’s servers.

:-)
Yes, without a doubt it looks funny.
Some time ago API Requests with the fr-FR parameter started to give strange problems.
So, because of this history, I asked you to try with zh-CN.
But if you are sure that the problem is with our server having an erratic behavior, let's wait for Adm Travis Bell to pass by here.
Only he will know how to give a good answer to your problem.
Let's wait for him to pass by here.

Alright, I wasn’t aware of this issue regarding the fr-FR language. In that case, yes, let’s wait for the boss, haha! Thx ticao.

It seems like it's still not really resolved. I'm not sure if it only concerns the fr-FR language, but I still randomly get 404 errors even though the URL exists.

@TheSizkarn said:
It seems like it's still not really resolved.
I'm not sure if it only concerns the fr-FR language,
but I still randomly get 404 errors even though the URL exists.

Well, considering that I haven't seen any other user reporting this type of problem, I'm starting to suspect that the error may be due to some combination of factors involving the TMDb Servers and other elements involved in the Request from your device, some Firewall, DNS, your ISP, etc...
I believe the admin's first question will be:
What is the complete error message?
There may be two generated by the TMDb servers.
Please let us know which one you receive.

Code    HTTP    Message  

6       404     Invalid id: The pre-requisite id is invalid or not found.  
37      404     The requested session could not be found.  

Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.

Général

s Mettre le curseur dans la barre de recherche
p Ouvrir le menu du profil
esc Fermer une fenĂŞtre ouverte
? Ouvrir la fenĂŞtre des raccourcis clavier

Sur les pages des médias

b Retour (ou vers le parent si faisable)
e Afficher la page de modification

Sur les pages des saisons des émissions télévisées

Afficher la saison suivante (flèche droite)
Afficher la saison précédente (flèche gauche)

Sur les pages des épisodes des émissions télévisées

Afficher l'épisode suivant (flèche droite)
Afficher l'épisode précédent (flèche gauche)

Sur toutes les pages des images / photos

a Ouvrir la fenĂŞtre d'ajout d'image / photo

Sur toutes les pages de modifications

t Ouvrir le sélecteur de traduction
ctrl+ s Envoyer le formulaire

Sur les pages des discussions

n Créer une nouvelle discussion
w Basculer le statut de suivi
p Basculer publique / privée
c Basculer fermer / ouvrir
a Ouvrir l'activité
r Répondre à la discussion
l Afficher la dernière réponse
ctrl+ enter Envoyer votre message
Page suivante (flèche droite)
Page précédente (flèche gauche)

Paramètres

Vous souhaitez évaluer ou ajouter cet élément à une liste ?

Connexion