Support Article
Connect-REST fails to test successfully
SA-5632
Summary
An error occurred when testing a Connect-REST rule.
Error Messages
"The response was not recognized as JSON or XML and cannot be saved."
Steps to Reproduce
- Create a Connect-REST rule.
- Define basic parameters.
- Select Method name as POST.
- Provide the request content in XML format.
- Click Test.
Root Cause
A defect in custom application code or rules:
The error occurs because the response is formatted as HTML. The REST connector is expects JSON or XML, and does not handle HTML.
Resolution
Perform the following local-change:
Update foreign service to return JSON or XML.
Published December 8, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.