Reputation: 3009
I'm trying to delete an event from one of my Google calendars using the Java API. They code looks like:
calendarService.events().delete( calendarId , eventId ).execute();
When I do so, I get the error:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 410 Gone
DELETE https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/jm1gamo1cj3dm68bidsaufffdg
{
"code" : 410,
"errors" : [ {
"domain" : "global",
"message" : "Resource has been deleted",
"reason" : "deleted"
} ],
"message" : "Resource has been deleted"
}
I can't figure out what the message is telling me.
Is it saying the event wasn't found? If so, the wording seems odd - why wouldn't it say "not found".
Or, is it saying it was deleted previously where the event is marked as deleted (a logical deletion) but still remains in the system (thus it knows it was previously deleted) possibly queued for a physical deletion?
Upvotes: 0
Views: 1859
Reputation: 6072
According to the Calendar API documentation here:
410: Gone
SyncToken
orupdatedMin
parameters are no longer valid. This error can also occur if a request attempts to delete an event that has already been deleted.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "deleted",
"message": "Resource has been deleted"
}
],
"code": 410,
"message": "Resource has been deleted"
}
}
So, if you already deleted an event and you try to delete it again, you will most likely be getting this error message.
Upvotes: 1