Well a client found it, so I don't have *too* much info, but I can see
it happened during a delete. For deletes what we do is we get the
original event and then we delete it. Here is my code and here is the
result:
IPSCGoogleSyncTask.m:938 Entity delete is failed with error : Error
Domain=com.google.GDataServiceDomain Code=501 UserInfo=0x4315070
"Operation could not be completed. (If-Modified-Since HTTP
precondition not supported on POST)"
{
NSLocalizedFailureReason = "(If-Modified-Since HTTP precondition
not supported on POST)";
error = "If-Modified-Since HTTP precondition not supported on
POST";
}
- (void)retrieveDeletedCompleteEntryForEntry:(NSString *)selfLink
{
_updatingTasksCount++;
// fetch a complete copy of the entry, including unknown XML, by
using the self link
GDataServiceTicket *ticket = [[self calendarService]
fetchCalendarEventEntryWithURL:[NSURL URLWithString:selfLink]
delegate:self
didFinishSelector:@selector
(fetchDeletedEntryTicket:finishedWithEntry:)
didFailSelector:@selector
(fetchEntryTicket:failedWithError:)];
[_tickets addObject:ticket];
}
- (void)fetchDeletedEntryTicket:(GDataServiceTicket *)ticket
finishedWithEntry:(GDataEntryCalendarEvent *)completeEntry
{
[_tickets removeObject:ticket];
[[self calendarService] deleteCalendarEventEntry: completeEntry
delegate:self
didFinishSelector:@selector(deleteTicket:deletedEntry:)
didFailSelector:@selector(deleteTicket:failedWithError:)];
}
On Feb 24, 3:12 pm, Trevor Johns <[email protected]> wrote:
> 2009/2/24 AK <[email protected]>:
>
>
>
> > I am getting this error in my code and since I'm using the GData
> > objective-C API, I know I'm generating the code. But the question is -
> > what does this mean and what causes it? That would help me figure it
> > out.
>
> AK, that sounds like it might be a bug in the client library.
>
> The If-Modified-Since header is how we're providing optimistic
> concurrency in newer versions of the Google Data protocol.
>
> That error occurs if an If-Modified-Since header was sent when it
> shouldn't have been. Specifically, POST requests shouldn't have a
> version associated with them, since they're strictly used for insert
> operations.
>
> Can you describe what you were doing when you got this error? Any
> sample code you could provide would be very useful.
>
> --
> Trevor Johns
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---