AdobeDocs / analytics-1.4-apis

Documentation and helpful resources for calling the Analytics 1.4 Apis
Apache License 2.0
117 stars 103 forks source link

Data Insertion API returns invalid XML #81

Closed phawxby closed 1 year ago

phawxby commented 4 years 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

gigazelle commented 1 year ago

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.