How to handle HTTP request with different status (200/400) ?
I have a pipeline reading a csv file and doing POST request to an API for each lines.
POST request are done via a HTTP Client processor
but I can receive a 200 response for a sucessful item created or a 400 with error fields. I want to send these errors to RabbitMQ but I don't know how to handle the 400 response, the pipeline stops and throw an error.
How to catch those 400 responses?
Edit: I followed @metadaddy 's answer to send error to another pipeline. Unfortunately I still don't retrieve the response. Here is some screenshots for easier readability.
original pipeline error output:
original pipeline > HTTP Client:
original pipeline > HTTP Client running getting error 400 from the API (normal behaviour needs to be catched):
error pipeline > send output to RabbitMQ or raw file:
content of the error file:
{
"Field2":"xxx",
"Field2":"xxx,
[...]
}