RottenTomatoes Api を使用してフィルム情報を取得しています。情報を取得している 250 の映画のリストがありますが、特定のポイントに到達すると、このエラーが発生します。ランダムに発生するようです。API の結果を取得して、自分のデータベースに入れています。そのようなエラーの理由はありますか?
Fatal error: Uncaught exception 'Exception' with message '0' in /home/ignitet1/public_html/CheckFilm/RottenTomatoes.php:340
Stack trace:
#0 /home/ignitet1/public_html/CheckFilm/RottenTomatoes.php(156): RottenTomatoes->getResource('http://api.rott...')
#1 ****/loadFullData.php(37): RottenTomatoes->getMovieInfo('771269025')
#2 {main}
thrown in ****RottenTomatoes.php</b> on line <b>340</b><br />
340行目はコードです。rottentomatoes.php は、API からの応答を解析するために使用される php ライブラリです。
if (isset($decodedResponse['error']))
throw new Exception('API Error: ' + $decodedResponse['error']);
return $decodedResponse;
問題の原因となっているコードを見つけるのに問題があります。