【问题标题】:OAuth2 playground 503 Backend Error while Clear event清除事件时 OAuth2 游乐场 503 后端错误
【发布时间】:2017-08-28 06:15:33
【问题描述】:

我试图从 C# 中清除主要日历事件:

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

在 google api 响应中发现以下错误:

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

]

我也尝试在 Google OAuth2.0 Playground 上进行检查,但它给了我以下 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"
      }
    ]
  }
}

经过一番谷歌搜索后,我也尝试通过指数退避算法重试。 但这些都不起作用。

【问题讨论】:

    标签: google-api google-calendar-api google-oauth oauth2-playground


    【解决方案1】:

    根据此thread,Google 上传服务器开始超时上传。除了您可能只是报告错误而不是处理错误之外,您的代码可能没有任何问题。

    当你在使用.Upload方法时遇到这样的错误,说明服务器太忙了,无法在超时时间内处理你的请求。您的程序应能识别此错误并调用.Resume 方法来恢复上传。

    【讨论】:

    • Abielita,在我的帐户中,日历 api 对 Get 请求的响应会成功,但是当我尝试清除主日历时,它会显示 503 后端错误。我认为这与上传/恢复无关。
    猜你喜欢
    • 1970-01-01
    • 2021-04-06
    • 1970-01-01
    • 2016-09-21
    • 2017-10-09
    • 1970-01-01
    • 2019-04-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多