Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google api 谷歌日历API删除410错误的含义是什么_Google Api_Google Calendar Api - Fatal编程技术网

Google api 谷歌日历API删除410错误的含义是什么

Google api 谷歌日历API删除410错误的含义是什么,google-api,google-calendar-api,Google Api,Google Calendar Api,我正在尝试使用JavaAPI从我的一个Google日历中删除一个事件。它们的代码如下所示: calendarService.events().delete( calendarId , eventId ).execute(); 当我这样做时,我会得到错误: com.google.api.client.googleapis.json.GoogleJsonResponseException: 410 Gone DELETE https://www.googleapis.com/calendar/v3

我正在尝试使用JavaAPI从我的一个Google日历中删除一个事件。它们的代码如下所示:

calendarService.events().delete( calendarId , eventId ).execute();
当我这样做时,我会得到错误:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 410 Gone
DELETE https://www.googleapis.com/calendar/v3/calendars/xxxxxxxxxxxxxxxxxxx@group.calendar.google.com/events/jm1gamo1cj3dm68bidsaufffdg
{
  "code" : 410,
  "errors" : [ {
    "domain" : "global",
    "message" : "Resource has been deleted",
    "reason" : "deleted"
  } ],
  "message" : "Resource has been deleted"
}
我搞不懂这条消息告诉我什么

是不是说没有找到事件?如果是这样,措辞似乎有些奇怪——为什么不说“未找到”


或者,它是说在事件被标记为已删除(逻辑删除)但仍保留在系统中(因此它知道它已被删除)可能排队等待物理删除的情况下,它先前已被删除?

根据日历API文档:

410:消失了

SyncToken
updateMin
参数不再有效。如果请求试图删除已删除的事件,也可能发生此错误

因此,如果您已经删除了一个事件,并且再次尝试删除它,则很可能会收到此错误消息

参考文献

谢谢!我错过了那一点。现在,我们来了解该事件之前是如何被删除的。
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "deleted",
    "message": "Resource has been deleted"
   }
  ],
  "code": 410,
  "message": "Resource has been deleted"
 }
}