Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

How to send back custom xml in 404 response Rest Services

Hello,
Does anyone know how to send back a custom payload when a user tired to request an endpoint that is not available or incorrect.
The custom payload i would like to return would be something simple like:

<root>
<error>Invalid Endpoint</error>
</root>

I have tried to do this with a tXMLMap however it keeps throwing an error regarding:
"No message body writer has been found for response class DefaultDocument"
Labels (3)
1 Reply
Anonymous
Not applicable

Hi, try using a wrong call handler.
Also, in 5.2, one of the issues with properly determining a response type for a fault response has been fixed, in cases where a browser is used (which leads to a complex Accept HTTP header being sent) - so please try 5.2...