Supporto The Movie Database

Hi

I've just come across something I can’t find in the API documentation. I’ve made a call to the /3/movie/{id}/rating method and passed an invalid rating-value as parameter.

JSON Body:

{"value":9.1 }

According to the documentation the API should have returned something like this:


{
    "status_code": 5,
    "status_message": "Failed…?"
}

But the API has returned:

{"failure":true,"error":"Unable to save the rating because: Value is not a multiple of .50."}

Have I missed something in the documentation?

6 risposte (nella pagina 1 di 1)

Jump to last post

Hi Dave,

Good find. The API should still serve the standard status_code error block. I've created a new ticket and will look at this shortly.

Thanks for your support.

Fix for this was just deployed.

Just tested it, now it returns a (400) Bad Request error. (Movie 550, rating: 9.1)

Yes, the HTTP status code on a validation error like this is 400. We still respond with body and a valid status_code error:

{"status_code":18,"status_message":"Unable to save the rating because: Value is not a multiple of .50."}

Cheers.

Sorry was my fault…

I haven’t seen the error message, because of .net (which I’m using) per default throws an error when a server returns an http error code….

(Details for the .Net developers with the same problem: http://stackoverflow.com/questions/692342/net-httpwebrequest-getresponse-raises-exception-when-http-status-code-400-ba)

Thanks your answer.

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi