Google api 谷歌日历API删除410错误的含义是什么
我正在尝试使用JavaAPI从我的一个Google日历中删除一个事件。它们的代码如下所示: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
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"
}
}