The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Conflict error (v2 API)

Highlighted
Established Member

Conflict error (v2 API)

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--]]

Tags (2)
3 REPLIES 3
Highlighted
Moderator

Re: Conflict error (v2 API)

Hello @SCPEBA2012,

 

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 webservices@constantcontact.com if you have further troubles and want us to troubleshoot this more.


Regards,
Jimmy D.
Tier II API Support Engineer
Highlighted
Established Member

Re: Conflict error (v2 API)

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.

Highlighted
Moderator

Re: Conflict error (v2 API)

Hi @SCPEBA2012,

 

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.


Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured