Soporte de 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 respuestas (en la página 1 de 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.

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión