我正在使用Google cloud api。
以下错误会导致我的页面空白。加载每个空白页时,调试日志文件显示以下错误。
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 :(得分:0)
我假设您使用的是Google APIs Client Library for PHP。如果是这样,您可以直接report this issue给在此库中工作的工程师。
我确实看到了similar reports,其中解决方案是用户端代码修复。 ' Google_Service_Exception' 表示您所做的请求未经过身份验证,邮件正文无效/格式错误,和/或邮件无效。
因此,我建议您尝试进一步调试代码,以便查看代码的哪一行引发此错误。确保您是using the library properly,并且API request是正确的。另外,请确保使用库的latest version。