analytics-1.4-apis icon indicating copy to clipboard operation
analytics-1.4-apis copied to clipboard

Data Insertion API returns invalid XML

Open phawxby opened this issue 4 years ago • 0 comments

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

phawxby avatar May 14 '20 09:05 phawxby