Skip to main content

Hi All,

Is there any way to get the response body for other http code in HTTP client processor? The API (POST method) I am calling, it gives error reason as response for error records with http code  400 in postman. In streamsets I want to get the error reason as response but getting 400 and record is going in error files.

Thanks in advance for your help.

 

Regards,

Anjalee

Hi @Anjalee

For this you have setting “Records for Remaining Statuses”. As our documentation states: “You can also configure the stage to generate records for all unsuccessful statuses that are not added to the Per-Status Actions list. You then specify the output field name that stores the error response body for those records.” So, if you just want HTTP status code instead of retrying, failing or producing error records, just use this option. Check for further details at https://docs.streamsets.com/portal/platform-datacollector/latest/datacollector/UserGuide/Processors/HTTPClient.html#concept_ghx_ypr_fw


@Anjalee 

 

can you please try configure the status code in HTTP client and check if it helps.

 

 


Hi @Dimas Cabré i Chacón  , @Bikram 

Thank you for your response. I tried finding the option Per-Status Actions but seems this configuration is not available. I am using data collector version 3.16.0 . In document also Per-Status Actions option is not available. https://docs.streamsets.com/portal/datacollector/3.16.x/help/datacollector/UserGuide/Processors/HTTPClient.html?hl=http%2Cclient .

It would be really great if we can some alternative to achieve the same.

Regards,

Anjalee 


Reply