<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to catch the message body after an http error? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-catch-the-message-body-after-an-http-error/m-p/2350815#M117602</link>
    <description>Hi,&lt;BR /&gt;Could you please indicate on which build version you got this issue?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
    <pubDate>Mon, 17 Oct 2016 08:21:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-17T08:21:43Z</dc:date>
    <item>
      <title>How to catch the message body after an http error?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-catch-the-message-body-after-an-http-error/m-p/2350814#M117601</link>
      <description>Hello everydody, 
&lt;BR /&gt;I send a message in a query. 
&lt;BR /&gt; 
&lt;BR /&gt;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). 
&lt;BR /&gt;In the cSetHeader, I get the body with the simple expression: "${Body}". 
&lt;BR /&gt; 
&lt;BR /&gt;In the cHttp, I added the parameter throwExceptionOnFailure=false to retrieve the error. 
&lt;BR /&gt; 
&lt;BR /&gt;After sending in http method, if the http return code isn't 200, I replace the body with cSetBody ("${headers.Body}"). 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/356580/Capture_TalendESB.jpg" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MFl1.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136103i557C8FAE845EDFE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MFl1.jpg" alt="0683p000009MFl1.jpg" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt;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. 
&lt;BR /&gt;Do you have an idea to resolve this problem ? 
&lt;BR /&gt; 
&lt;BR /&gt;Thank you in advance. 
&lt;BR /&gt; 
&lt;BR /&gt;Krokodile.</description>
      <pubDate>Sat, 16 Nov 2024 10:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-catch-the-message-body-after-an-http-error/m-p/2350814#M117601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch the message body after an http error?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-catch-the-message-body-after-an-http-error/m-p/2350815#M117602</link>
      <description>Hi,&lt;BR /&gt;Could you please indicate on which build version you got this issue?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 17 Oct 2016 08:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-catch-the-message-body-after-an-http-error/m-p/2350815#M117602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-17T08:21:43Z</dc:date>
    </item>
  </channel>
</rss>

