What should I do when receiving generic error when submitting an XML for the API POST v1/forms/submit?
When using the API and running the query POST v1/forms/submit?apiToken={apiToken}&voyageNo={voyageNo}&portCallSeq={portCallSeq}&inTransit={inTransit}&async={async}, users can occasionally receive the below error message:
{"successful": false, "response": {"errors": [{"exception": null, "code": "UNKNOWN", "message": "An error has occurred."}]}}
To troubleshoot the root cause, it is recommended to obtain copies of successful and failed XMLs, then search for discrepancies using an XML comparison (for example https://extendsclass.com/xml-diff.html ).
In the example below, it was found the failed XML (right) had an additional "mp“ field that seemed to be a copy of the "LoadTemp“ field. Furthermore, this field was not found on the successful XML.
Removal of this field eventually resulted in successful resubmission of the API query.