Apr 28, 202011:40 AM - edited Apr 28, 202011:43 AM
Member
Insert Contact Via API Generates Nondescript Error
Submitting a request to insert a contact through the API and getting a "property cannot be missing or null" message - with no indication of what property is the problem. Can the returned errors be amended to include which property is the problem?
Here's the whole response from HubSpot:
{""message"":""property cannot be missing or null"",""status"":""error"",""correlationId"":""a6d49444-8375-4522-ae6e-3acd439b8240"",""requestId"":""23e9f4cb3e42a57bb64a14e0fa95181e""}
Insert Contact Via API Generates Nondescript Error
I had property:value pairs before, but that gave me the same error message. I saw in another post that was similar that someone tried name:value and it seemed to work.
The double-quotes shouldn't be the issue. The JSON that's generated seems to contain double quotes by default. We have a client using this integration for the last several years and they haven't had problems with the double-quotes. The only difference is, this new client who wants to integrate with HubSpot wants to insert contacts, whereas the other only updated.
Why can't the error indicate exactly which property is the problem?
I wouldn't expect it to work since it's not following our documented format. Could you share with me the post that you chanced upon?
For now, our error doesn't point to the specific property and in this case, could you share with me your current POST body? I'd be happy to dig into this for you.
In particular, reference the post from Feb 28, 20198:32 AM by user "koseto".
Seems like your error trapping needs to provide more details to your logs. Hard to imagine that a check against properties can't identify a property that fails. Either seems like an oversight or lazy coding.