cancel
Showing results for 
Search instead for 
Did you mean: 

Misleading error message

Highlighted
Occasional Participant

Misleading error message

Posting the following (faulty) XML



<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text" />
  <id>data:,none</id>
  <summary type="text">Contact</summary>
  <content type="application/vnd.ctct+xml">
    <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
     <EmailAddress>test@example.com</EmailAdress>
      <OptInSource>ACTION_BY_CONTACT</OptInSource>
      <ContactLists>
        <ContactList id="http://api.constantcontact.com/ws/customers/test/lists/1" />
      </ContactLists>
    </Contact>
  </content>
  <updated>2010-06-22T07:26:39+03:00</updated>
<author/>
</entry>

results in this error message


Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>.


However, the error actually lies inside the <Content> element (which is really the <content> element), not outside as the error message will have us belive.


Could you please correct this error message so I don't waste more time looking for errors where there aren't any the next time?

Jakob Skjerning

substancelab.com - crafting quality web applications

 

4 REPLIES 4
CTCT Employee

Re: Misleading error message

I apologize for the inaccurate error messaging that you are receiving. I have forwarded this information on to the product manager to see if we can have this error messaging adjusted to be more accurate. Thank you for bringing this to our attention. If you have any other questions or concerns please feel free to post them on this forum.

David J

Member

Re: Misleading error message

Hi,

 

I'm trying to do a similar post (for the first time using the CC API), and am getting the same error message - but I don't know how to diagnose exactly which part of my request is wrong.  Any help on how to do that?

 

Here is my request body:

<?xml version="1.0"?>
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2005/Atom">
  <title type="text" />
  <updated>YYYY-09-DDT08:20:01.526Z</updated>
  <author />
  <id>data:,none</id>
  <summary type="text">Contact</summary>
  <content type="application/vnd.ctct+xml">
    <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
      <EmailAddress>634827756011461962@rebatecity.com</EmailAddress>
      <EmailType>HTML</EmailType>
      <FirstName>first_634827756011461962</FirstName>
      <LastName>last_634827756011461962</LastName>
      <OptInSource>ACTION_BY_CONTACT</OptInSource>
      <ContactLists />
    </Contact>
  </content>
</entry>

 

Thanks,

Mike

Member

Re: Misleading error message

Well, I figured out the problem in this particular case (duh):

<updated>YYYY-09-DDT08:20:01.526Z</updated>

 

Date formatting booboo.

 

That said, I still have the same general question about diagnosing such problems in general - is there no way you (CC) can include more specific into in the error message?  Or, in the absense of that, is there any suggestions on other more reliable diagnosis techniques than "look and guess"?

 

Mike

CTCT Employee

Re: Misleading error message

Hi Mike,

 

I know what you mean--that error message isn't terribly helpful.  I have actually brought that up to our quality engineering team to see if we can generate more helpful error messages. 

 

Thanks for your feedback.

 

Best Regards,

Shannon W.

API Support Specialist