2017-08-28 155 views
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后端的错误。我认为它不是关于上传/恢复。 –