2017-01-11 8 views
1

GoogleクラウドAPIを使用しています。GoogleクラウドAPIのエラー - キャッチされない例外 'Google_Service_Exception'

エラーが発生すると、ページが空白になります。デバッグログファイルには、各空白ページのロード時に次のエラーが表示されます。

Fatal error: Uncaught exception 'Google_Service_Exception' with message '{ 
"error": { 
    "errors": [ 
    { 
    "domain": "global", 
    "reason": "backendError", 
    "message": "Backend Error" 
    } 
    ], 
    "code": 500, 
    "message": "Backend Error" 
} 
} 
' in /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php:123 
Stack trace: 
#0 /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php(82): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(Guzz 
leHttp\Psr7\Request), 'Google_Service_...') 
#1 [internal function]: Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') 
#2 /var/www/html/wp-content/plugins/test/google_api/src/Google/Task/Runner.php(181): call_user_func_array(Array, Array) 
#3 /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php(57): Google_Task_Runner->run() 
#4 /var/www/html/wp-content/plugins/test/google_api/src/Google/Client.p in /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php on li 
ne 123 

Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Not Found' in /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php:123 
Stack trace: 
#0 /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php(82): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(Guzz 
leHttp\Psr7\Request), 'Google_Service_...') 
#1 [internal function]: Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') 
#2 /var/www/html/wp-content/plugins/test/google_api/src/Google/Task/Runner.php(181): call_user_func_array(Array, Array) 
#3 /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php(57): Google_Task_Runner->run() 
#4 /var/www/html/wp-content/plugins/test/google_api/src/Google/Client.php(758): Google_Http_REST::execute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request) 
, 'Google_Service_...', Array) 
#5 /var/www/html/wp-content/plugins/test in /var/www/html/wp-content/plugins/test/google_api/src/Google/Http/REST.php on line 123 

私は両方のエラーが関連していると思います。 ありがとうございます。

+0

"キャッチされていない例外 'Google_Service_Exception'がメッセージ 'Not Found'で表示されました。 エラーメッセージを共有するだけでは、何をしようとしているのかわからなくても、大きな助けにはなりません。私が言うことができるのは、あなたがアクセスしようとしているものは、それが存在するとは限りません。 – jdp

答えて

0

Google APIs Client Library for PHPを使用していることを前提としています。もしそうなら、直接このライブラリに取り組んでいるエンジニアにreport this issueすることができます。

私はこの解決策がユーザーエンドコードの修正であった場合、similar reportsを参照してください。 'Google_Service_Exception'は、あなたが行ったリクエストが認証されていないか、無効な/不正な形式の投稿があり、無効なURLになっていることを示しています。

したがって、コードのどの行がこのエラーをスローしているかを確認するために、さらにコードをデバッグすることをお勧めします。 using the library properlyで、API requestが正しいことを確認してください。また、ライブラリのlatest versionを使用していることを確認してください。

関連する問題