- Constant Contact Community
- :
- Developer Community
- :
- Authentication and Access (ie. 401 errors!)
- :
- Re: Receiving 500 Error Code even though the opera...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Receiving 500 Error Code even though the operation worked
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-08-2011 04:30 PM
Hello,
I've been applying some updates to my drupal module and PHP code library (now using curl).
I have this working fine in drupal 7 but getting a weird error in drupal 6, both use the exact same code library.
I receive a 500 http error code when updating a contact even though the update is working, for example I'm updating the lists the contact is subscribed to and also have been removing all lists the contact is on, both work as when I check in constantcontact.com the changes reflect correctly however my app is always receiving the 500 error code, I've also checked this with a standalone rest tester tool and get the same response.
Example code below.
<entry xmlns="http://www.w3.org/2005/Atom">
<id>http://api.constantcontact.com/ws/customers/******
<title type="text">Contact: Tester123456@example.com</title>
<updated>2008-04-25T19:29:06.096Z</updated>
<author></author>
<content type="application/vnd.ctct+xml">
<Contact xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers//*****
<EmailAddress>Tester123456@example.com</EmailAddre
<OptInSource>ACTION_BY_CONTACT</OptInSource>
<OptInTime>2009-11-19T14:48:41.761Z</OptInTime>
<EmailType>Text</EmailType>
<ContactLists>
</ContactLists>
</Contact>
</content>
</entry>
Note that I'm using my test/trial CC account (not the one I'm logged in with now the other one ending in uk).
Can you help diagnose this please.
Thanks
James Benson
Re: Receiving 500 Error Code even though the operation worked
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-09-2011 08:33 AM
Hello James,
I took a look at your XML and I believe I found the problem. I think it is actually a defect on our end that is giving a 500 error when you try to do an update to the contact with an upper case email address. I did some testing and I am going to send this over to our engineers to look at and fix as soon as possible. Also note that this only seems to be happening when you have the OptInSource to be set as ACTION_BY_CONTACT, if you do not have the opt in source, or have it set to ACTION_BY_CUSTOMER, your XML will succeed.
Currently the best way to work around it would be to force the email address to be lowercase before sending the PUT call.
If you have any questions please let me know.
Regards,
NOC Analyst
Constant Contact
Re: Receiving 500 Error Code even though the operation worked
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-09-2011 02:58 PM
Thanks for the reply, I've modified my code to convert the email to lowercase and it works fine now.


