The Movie Database Support

Hi,

When issuing a request to the movie endpoint with a long enough id, for example GET /movies/9999999999999999999 the response comes back with a http status code 200 OK but a code 6 message:

{'status_code': 6, 'status_message': 'Invalid id: The pre-requisite id is invalid or not found.'}

This should probably send a 404

3 replies (on page 1 of 1)

Jump to last post

What's the full URL you're requesting? My tests show a proper 404.

travisbell$ curl -I -L "https://api.themoviedb.org/3/movie/550000000?api_key=####"
HTTP/1.1 404 Not Found
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After
Cache-Control: public, max-age=28800
Content-Length: 84
Content-Type: application/json;charset=utf-8
Date: Mon, 27 Nov 2017 18:46:36 GMT
ETag: "37a6259cc0c1dae299a7866489dff0bd"
Server: openresty
X-Memc: MISS
X-Memc-Age: 0
X-Memc-Expires: 28800
X-Memc-Key: 3bc9987da9463f66c9db18ac234de639
Connection: keep-alive

This is the full request and response headers

And this yields a status_code 6, not 34, like the test you provided.

curl -v  "https://api.themoviedb.org/3/movie/9999999999999999999?api_key=###"
 Trying 54.221.197.78...
 Connected to api.themoviedb.org (54.221.197.78) port 443 (#0)
...
 GET /3/movie/9999999999999999999?api_key=### HTTP/1.1
 Host: api.themoviedb.org
 User-Agent: curl/7.47.0
 Accept: */*

 HTTP/1.1 200 OK
 Access-Control-Allow-Origin: *
 Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After
 Cache-Control: public, max-age=28800
 Content-Type: application/json;charset=utf-8
 Date: Tue, 28 Nov 2017 07:55:39 GMT
 Server: openresty
 X-Memc: MISS
 X-Memc-Age: 0
 X-Memc-Expires: 28800
 X-Memc-Key: 9350c8606a4afcad93a80d663d9a42cf
 X-RateLimit-Limit: 40
 X-RateLimit-Remaining: 39
 X-RateLimit-Reset: 1511855749
 Content-Length: 94
 Connection: keep-alive

 Connection #0 to host api.themoviedb.org left intact
{"status_code":6,"status_message":"Invalid id: The pre-requisite id is invalid or not found."}

Interesting, for some reason doing a HEAD request does the right thing, while a GET doesn't. But the issue is more complicated than that, it only happens when the int is a bignum. A regular int is fine.

tbell$ curl -v  "https://api.themoviedb.org/3/movie/9999999?api_key=###"
*   Trying 23.21.43.191...
* Connected to api.themoviedb.org (23.21.43.191) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.themoviedb.org
* Server certificate: RapidSSL SHA256 CA
* Server certificate: GeoTrust Global CA
> GET /3/movie/9999999?api_key=### HTTP/1.1
> Host: api.themoviedb.org
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After
< Cache-Control: public, max-age=28800
< Content-Type: application/json;charset=utf-8
< Date: Wed, 29 Nov 2017 02:17:20 GMT
< ETag: "37a6259cc0c1dae299a7866489dff0bd"
< Server: openresty
< X-Memc: MISS
< X-Memc-Age: 0
< X-Memc-Expires: 28800
< X-Memc-Key: 1148ff4940b76ece64a8da0b61cc99cf
< Content-Length: 84
< Connection: keep-alive
<
* Connection #0 to host api.themoviedb.org left intact

Can't find a movie or TV show? Login to create it.

Want to rate or add this item to a list?

Login