trakt / api-help

Trakt API docs at https://trakt.docs.apiary.io
186 stars 7 forks source link

500 Internal server error on episode tmdb endpoint #435

Closed G4Zz0L1 closed 10 months ago

G4Zz0L1 commented 10 months ago

Just like the title say, we've had this error on a single episode, blocking a script that fetches data from Trakt. Calling the url https://api.trakt.tv/search/tmdb/3042827?id_type=episode with something like

curl -sSf --header 'Content-Type: application/json' --header 'trakt-api-version: 2' --header 'trakt-api-key: xxx' --header 'Authorization: Bearer xxx' 'https://api.trakt.tv/search/tmdb/3042827?id_type=episode' -i

returns

date: Sat, 27 Jan 2024 03:09:23 GMT
content-type: application/json
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-download-options: noopen
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
x-pagination-page: 1
x-pagination-limit: 10
expires: Sat, 27 Jan 2024 11:09:21 GMT
x-pagination-page-count: 1
x-pagination-item-count: 3
cache-control: public, max-age=28800
x-error-message: Internal server error. Please open a support issue and include your full API request and response, including all headers.
vary: Accept-Encoding
x-ratelimit: {"name":"AUTHED_API_GET_LIMIT","period":300,"limit":1000,"remaining":999,"until":"2024-01-27T03:10:00Z"}
x-request-id: d99e3984-26c2-48e7-988c-87f32a22a827
x-runtime: 2.544411
cf-cache-status: MISS
server: cloudflare
cf-ray: 84bdcbdc4cfd83b2-MXP
alt-svc: h3=":443"; ma=86400

Let me know if I can add or try something. Thanks in advance.

rectifyer commented 10 months ago

Looks like there was a duplicate episode behind the scenes with the same TMDB ID that was breaking this. Also, you should use ?type=episode (not id_type)

G4Zz0L1 commented 10 months ago

Thanks a lot!