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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to catch the message body after an http error?

Hello everydody,
I send a message in a query.

But if the http response code isn't 200, I want to send my original message in a log (a log in my example but in a queue in my route).
In the cSetHeader, I get the body with the simple expression: "${Body}".

In the cHttp, I added the parameter throwExceptionOnFailure=false to retrieve the error.

After sending in http method, if the http return code isn't 200, I replace the body with cSetBody ("${headers.Body}").
0683p000009MFl1.jpg
My problem is when I get the message before the cHttp, I have an http error 400 (Bad Request) while this is a http 404 error.
Do you have an idea to resolve this problem ?

Thank you in advance.

Krokodile.
Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi,
Could you please indicate on which build version you got this issue?
Best regards
Sabrina