infusionsoft / infusionsoft-php

PHP client library for the Infusionsoft API.
https://developer.infusionsoft.com/
Other
129 stars 126 forks source link

data query returned error: ERROR: 2 - Invalid return payload: enable debugging to examine incoming payload (XML error at line 1, check URL) #213

Open jakedewitt87 opened 5 years ago

jakedewitt87 commented 5 years ago

So when requesting some data from a clients application, we are receiving the below error message:

'data query returned error: ERROR: 2 - Invalid return payload: enable debugging to examine incoming payload (XML error at line 1, check URL)'

After enabling debugging on the Infusionsoft SDK, I was able to get a read out of the XML returned and it appears that one of the company records in this clients application contains some bad characters in their StreetAddress1 field, it contains the following characters:

I have told the client to go and clean up this specific records Street Address 1 field. The issue is that this bad data causes our script to fail and requires manual intervention in order to fix, which is not ideal, it would be best if the API either could clean out these bad characters or gracefully handle them in such a way where it did not break the script from running. Thanks.

jakedewitt87 commented 5 years ago

Oh just in case that characters are not showing up, this is what they were, "& #11;" (just remove the space after the "&".