Google App Engine でアプリを使用しています。コードの一部で、ドキュメント API を使用して Google ドキュメントを読み取ります。コードは次のようになります。
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey(Constants.CONSUMER_KEY);
oauthParameters.setOAuthConsumerSecret(Constants.CONSUMER_SECRET);
oauthParameters.setOAuthToken(Constants.ACCESS_TOKEN);
oauthParameters.setOAuthTokenSecret(Constants.ACCESS_TOKEN_SECRET);
DocsService client = new DocsService("sakshum-YourAppName-v1");
client.setOAuthCredentials(oauthParameters,
new OAuthHmacSha1Signer());
URL feedUrl = new URL("https://docs.google.com/feeds/default/private/full/");
DocumentQuery dquery = new DocumentQuery(feedUrl);
dquery.setTitleQuery(title);
dquery.setTitleExact(true);
dquery.setMaxResults(10);
DocumentListFeed resultFeed = client.getFeed(dquery,
DocumentListFeed.class);
そしてそれは例外で失敗します:
vik.sakshum.sakshumweb.server.common.CommonServiceCode getGoogleDoc: Exception is :Unable to complete the HTTP request
これは常に発生するわけではありませんが、時々発生します。では、この障害状況を処理する正しい方法は何でしょうか? GAE API の信頼性が非常に低いという問題はありますか? それは、より良い方法または他の方法で処理するために修正できるコードの問題ですか?