Hi Alain, It appears to be random. If-Match: * does not seem to solve the issue, as it still occurs.
We also attempted a workaround where upon receiving a 409 error, we would perform another retrieval of the user's profile. We then compared this with both the original request and what we tried to update it with. 1) Retrieve Profile. 2) Attempt update of Profile. 3) on 409, retrieve Profile again. 4) Compare (3) with (1) and (2). We sometimes discovered that (1) was different than what was expected. For example, if we know a user has "contact sharing" set to "true" (via previous update), sometimes we received "false." This seems to suggest that the previous update may not have actually completed by the time we made our current request, despite a successful return. Perhaps the attempt of (1) came too soon after a previous update? But if that's the case, why are we receiving a successful response from the first update? That is, when we successfully update a profile, we receive the updated profile and by all appearances it looks correct. The next call to retrieve the profile results in something different, we attempt our update, and we get the 409 error. For what it's worth, in the past we have seen successful updates where nothing actually changed. That is, when we update a profile from "false" to the same value of "false," we'll receive a successful response and a correct user profile. Additionally, this was not the majority of our errors, as sometimes (1) was correct and (3) was not, or (2) was the same as (3) which would suggest our update did succeed. I went back through our logs for the most-recent errors, and noticed that in most cases, they seem to occur either when we perform a second update soon after the first, or when we try to update the profile of a newly-created account (made via the Provisioning API). Note that in both cases we still receive a user profile in our first retrieval attempt, otherwise we'd expect to see a "404 resource not found" error. Is there something else besides the Etag that is used for version-control? Thanks! On Thursday, April 5, 2012 11:28:02 AM UTC-10, Alain wrote: > > Hello Keith, > > Do you know if this issue is occurring with a specific set of users, for > all the users or appears to be random? Also, do you know if specifying > "If-match: *" solve the issue? > I'm not 100% sure this is coming from the Etag, but specifying the > if-match header might confirm it or not. > > Thanks! > Alain > > On Wed, Apr 4, 2012 at 10:16 AM, K H <> wrote: > >> Hello, >> >> Below is the entire HTTP response from using version 3.0 of the API. >> This specific error entry was an attempt to update the user's profile with >> gContact:status indexed="false": >> >> '_protocol' => 'HTTP/1.1', >> '_content' => '<?xml version=\'1.0\' encoding=\'UTF-8\'?><entry xmlns=\' >> http://www.w3.org/2005/Atom\' xmlns:gContact=\' >> http://schemas.google.com/contact/2008\' xmlns:batch=\' >> http://schemas.google.com/gdata/batch\' xmlns:gd=\' >> http://schemas.google.com/g/2005\' >> gd:etag=\'"UEBUGUsJQit7I2A0"\'><id> >> http://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username]</id><updated>2012-04-04T02:37:03.770Z</updated><app:edited >> >> xmlns:app=\'http://www.w3.org/2007/app\'>2012-04-04T02:37:03.770Z</app:edited><category >> >> scheme=\'http://schemas.google.com/g/2005#kind\' term=\' >> http://schemas.google.com/contact/2008#profile\'/><title>[redacted]</title><link >> >> rel=\'http://schemas.google.com/contacts/2008/rel#photo\' >> type=\'image/*\' href=\' >> https://www.google.com/m8/feeds/photos/profile/[domain.edu]/[username]\'/><link >> >> rel=\'self\' type=\'application/atom+xml\' href=\' >> https://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username]\'/><link >> >> rel=\'edit\' type=\'application/atom+xml\' href=\' >> https://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username]\'/><gd:name><gd:fullName>[redacted]</gd:fullName><gd:givenName>[redacted]</gd:givenName><gd:familyName>[redacted]</gd:familyName></gd:name><gContact:status >> >> indexed=\'true\'/><gd:email rel=\'http://schemas.google.com/g/2005#other\' >> address=\'[username]@[domain.edu]\' primary=\'true\'/><gd:email rel=\' >> http://schemas.google.com/g/2005#other\' >> address=\'[username]@[secondary].[domain.edu]\'/></entry>', >> '_rc' => '409', >> '_headers' => >> 'connection' => 'close', >> 'cache-control' => 'private, max-age=0', >> 'gdata-version' => '3.1', >> 'date' => 'Wed, 04 Apr 2012 02:37:03 GMT', >> 'client-ssl-cert-issuer' => '/C=ZA/O=Thawte Consulting (Pty) >> Ltd./CN=Thawte SGC CA', >> 'client-ssl-cipher' => 'RC4-SHA', >> 'client-peer' => '74.125.127.147:443', >> 'client-date' => 'Wed, 04 Apr 2012 02:37:03 GMT', >> 'client-ssl-warning' => 'Peer certificate not verified', >> 'content-type' => 'application/atom+xml; charset=UTF-8; type=entry', >> 'x-xss-protection' => '1; mode=block', >> 'server' => 'GSE', >> 'client-response-num' => 1, >> 'x-frame-options' => 'SAMEORIGIN', >> 'x-content-type-options' => 'nosniff', >> 'client-ssl-cert-subject' => '/C=US/ST=California/L=Mountain >> View/O=Google Inc/CN=www.google.com', >> 'expires' => 'Wed, 04 Apr 2012 02:37:03 GMT' >> '_msg' => 'Conflict', >> '_request' => >> '_content' => '<?xml version=\'1.0\' encoding=\'UTF-8\'?> >> <atom:entry gd:etag=""DRUBFkwKEyt7I2A_"" xmlns:atom=" >> http://www.w3.org/2005/Atom" xmlns:batch=" >> http://schemas.google.com/gdata/batch" xmlns:gContact=" >> http://schemas.google.com/contact/2008" xmlns:gd=" >> http://schemas.google.com/g/2005"> >> <app:edited xmlns:app="http://www.w3.org/2007/app >> ">2012-04-04T02:37:03.420Z</app:edited> >> <category scheme="http://schemas.google.com/g/2005#kind" term=" >> http://schemas.google.com/contact/2008#profile" /> >> <gContact:status indexed="false" /> >> <gd:email address="[username]@[domain.edu]" primary="true" rel=" >> http://schemas.google.com/g/2005#other" /> >> <gd:name> >> <gd:familyName>[redacted]</gd:familyName> >> <gd:fullName>[redacted]</gd:fullName> >> <gd:givenName>[redacted]</gd:givenName> >> </gd:name> >> <id> >> http://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username] >> </id> >> <link href=" >> https://www.google.com/m8/feeds/photos/profile/[domain.edu]/[username]" >> rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" /> >> <link href=" >> https://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username]" >> >> rel="self" type="application/atom+xml" /> >> <link href=" >> https://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username]" >> >> rel="edit" type="application/atom+xml" /> >> <title>[redacted]</title> >> <updated>2012-04-04T02:37:03.420Z</updated> >> </atom:entry>', >> '_uri' => ' >> https://www.google.com/m8/feeds/profiles/domain/[domain.edu]/full/[username] >> ', >> '_headers' => >> 'user-agent' => 'Google_at_[EduDomain]_ProfilesAPI-perl/1.00', >> 'content-type' => 'application/atom+xml; charset=UTF-8; >> type=entry', >> 'connection' => 'Keep-Alive', >> 'gdata-version' => '3.0', >> 'accept' => 'application/atom+xml', >> 'from' => '<[admin]@[domain.edu]>', >> 'if-match' => 'Etag', >> 'content-length' => 1383, >> 'authorization' => 'GoogleLogin auth=[redacted]', >> 'host' => 'www.google.com' >> '_method' => 'PUT', >> '_uri_canonical' => $VAR1->{'_request'}{'_uri'} >> >> >> Please let me know if there is anything else you need from us. We've >> also opened a support ticket, but for completeness we also monitor this >> forum. Thanks! >> >> >> >> On Tuesday, April 3, 2012 12:47:02 PM UTC-10, Alain wrote: >> >>> Hello, >>> >>> Can you share with us the entire response body that is sent back from >>> the API? Please make sure to hide any confidential information! >>> >>> Thanks! >>> Alain >>> >>> >>> On Tue, Apr 3, 2012 at 10:00 AM, K H <> wrote: >>> >>>> Our education domain is receiving intermittent HTTP 409 Conflict errors >>>> when updating user profiles, and the profiles themselves are not updated. >>>> We first retrieve the user's profile and Etag, change the gContact:status >>>> indexed attribute, and submit the entire profile back to Google. >>>> >>>> Some updates succeed, but others fail with the undocumented 409 error. >>>> We are given the original XML request body back in the response content >>>> and >>>> by all indications everything appears correct. Could someone please >>>> explain what circumstances generate a Conflict error? We understand that >>>> a >>>> 412 is for an outdated Etag, 404 when the profile doesn't exist, but 409 >>>> throws us for a loop. >>>> >>>> We also understand that we can just * the Etag element to overwrite all >>>> other changes, but we would only use that as a last resort. >>>> >>>> Thanks! >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google Contacts, Shared Contacts and User Profiles APIs" group. >>>> To post to this group, send email to >>>> google-contacts-api@**googlegroups.com<[email protected]> >>>> To unsubscribe from this group, send email to >>>> google-contacts-api+**[email protected]<google-contacts-api%[email protected]> >>>> For more options, visit this group at >>>> http://code.google.com/apis/**contacts/community/forum.html<http://code.google.com/apis/contacts/community/forum.html> >>>> >>> >>> >>> >>> -- >>> Alain Vongsouvanh | Developer Programs Engineer >>> >> -- >> You received this message because you are subscribed to the Google >> Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html >> > > > > -- > Alain Vongsouvanh | Developer Programs Engineer > -- You received this message because you are subscribed to the Google Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html
