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 replies (on page 1 of 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.

映画やテレビ番組が見つかりませんか?ログインして作成してください。

全般

s 検索バーに移動する
p プロファイルメニューを開く
esc 開いているウィンドウを閉じる
? キーボードショートカットウィンドウを開く

メディアのページ

b 戻る(または該当する場合は親に)
e 編集ページに行く

テレビ番組のシーズンのページ

(右矢印)次のシーズンに行く
(左矢印)前のシーズンに戻る

テレビ番組のエピソードのページ

(右矢印)次のエピソードに進む
(左矢印)前のエピソードに戻る

全ての画像のページ

a 画像追加ウィンドウを開く

全ての編集ページ

t 翻訳選択を開く
ctrl+ s フォームを送信する

ディスカッションのページ

n 新しいディスカッションを作成する
w 監視ステータスを切り替える
p 公開/非公開を切り替える
c 閉じる/開くを切り替える
a アクティビティを開く
r ディスカッションに返信
l 最後の返事に行く
ctrl+ enter メッセージを送信する
(右矢印)次のページ
(左矢印)前のページ

設定

このアイテムを評価したり、リストに追加したりしたいですか?

ログイン

メンバーではありませんか?

登録してコミュニティに参加