Starting this morning, my synchronization utility is getting intermittent http.status.conflict errors when updating contact information. It appears to happen ever few hundred calls and never on the same contact (a subsequent re-attempt on a failed contact appears to work without problems).
There have been no changes to my code, which was working yesterday with no problems. Is anyone else seeing this?
v2 API, with Java library.
Error info: [
RawApiRequestError [errorKey=http.status.conflict, errorMessage=There was a conflict between the supplied data and the existing resource.],
RawApiRequestError [errorKey=url, errorMessage=https://api.constantcontact.com/v2/contacts/--redacted--]]
Thank you for reaching out to Constant Contact's API Support.
Generally the conflict message would occur when using that endpoint (POST to create a new contact) if the contact already exists. My assumption that it works on your second attempt is that you have logic to do a PUT when the contact already exists and that logic is kicking in.
There have been some known slow internet connection issues over the last day or two which could be causing some hiccups. Feel free to reach out to use at email@example.com if you have further troubles and want us to troubleshoot this more.
In all known cases, this was an existing contact being updated. We are using the 4.2.0 java SDK and calling the IContactService.updateContact(...) method. Digging into the github repository, I see that that method always uses PUT.
I have resolved the situation in the same way I deal with gateway timeouts (which also seem to occur more frequently than I would like) -- that is, that I retry the operation up to three times before failing completely.
As such, I suppose I don't need further assistance, but I do appreciate the response.
Out of curiosity are you putting in any kind of delay between your multiple attempts, or do they immediately follow each other? I would like to dig in to this a bit and see if I can figure out why this is happening and if something similar is happening with gateway timeouts.