0

我試圖清除C#主日曆事件:的OAuth2操場503後端錯誤,同時清除事件

Google.Apis.Requests.RequestError 
Backend Error [503] 
Errors [ 
     Message[Backend Error] Location[ - ] Reason[backendError] Domain[global] 

] 

我也試圖檢查:

calendarService.Calendars.Clear("primary").Execute(); 

以下錯誤在谷歌API響應被發現在谷歌OAuth2.0遊樂場,但它給了我以下503錯誤:

POST /calendar/v3/calendars/primary/clear HTTP/1.1 
Host: www.googleapis.com 
Content-length: 0 
Content-type: application/json 
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
HTTP/1.1 503 Service Unavailable 
Content-length: 177 
X-xss-protection: 1; mode=block 
X-content-type-options: nosniff 
Transfer-encoding: chunked 
Expires: Mon, 28 Aug 2017 05:52:33 GMT 
Vary: Origin, X-Origin 
Server: GSE 
-content-encoding: gzip 
Cache-control: private, max-age=0 
Date: Mon, 28 Aug 2017 05:52:33 GMT 
X-frame-options: SAMEORIGIN 
Alt-svc: quic=":443"; ma=2592000; v="39,38,37,35" 
Content-type: application/json; charset=UTF-8 
{ 
    "error": { 
    "code": 503, 
    "message": "Backend Error", 
    "errors": [ 
     { 
     "domain": "global", 
     "message": "Backend Error", 
     "reason": "backendError" 
     } 
    ] 
    } 
} 

一些谷歌搜索後,我也試圖通過指數退避算法重試。 但這些都不起作用。

回答

0

根據此thread,Google上傳服務器開始超時上傳。除了您可能只是報告錯誤而不是處理錯誤之外,您的代碼可能沒有任何問題。

When you get an error like this while using the .Upload method, it indicates that the server is too busy to handle your request within the timeout period. Your program should recognize this error and call the .Resume method to resume the upload.

+0

Abielita, 我賬戶上的日曆API響應Get請求給成功,但是當過我嘗試清除主日曆顯示它503後端的錯誤。我認爲它不是關於上傳/恢復。 –