Closed phawxby closed 1 year ago
When an error occurs with the data insertion API invalid XML is returned, multiple root nodes.
<?xml version="1.0" encoding="UTF-8"?> <status>FAILURE</status> <reason>NO account</reason>
While fixing this would obviously be difficult given it would likely be a breaking change it definitely something that should be noted in the documentation. Furthermore the documentation is wrong and states multiple xml declarations are returned in a single response, that does not match what I'm seeing. https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/data-insertion-api/reference/r_post_response_codes.md
This invalid XML is making parsing problematic. https://github.com/Leonidas-from-XIV/node-xml2js/issues/197#issuecomment-628488459
Thank you for reporting this! I've removed the multiple declarations, improved the formatting, and added a note that failure responses can contain multiple root nodes.
When an error occurs with the data insertion API invalid XML is returned, multiple root nodes.
While fixing this would obviously be difficult given it would likely be a breaking change it definitely something that should be noted in the documentation. Furthermore the documentation is wrong and states multiple xml declarations are returned in a single response, that does not match what I'm seeing. https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/data-insertion-api/reference/r_post_response_codes.md
This invalid XML is making parsing problematic. https://github.com/Leonidas-from-XIV/node-xml2js/issues/197#issuecomment-628488459