Support Questions

Find answers, ask questions, and share your expertise

how to get error response like 400 and 500 using InvokeHTTP processor in Apache NiFi?

avatar
Contributor

Hello sir,

I am using the InvokeHTTP processor in Apache NiFi to call an API. I am writing the response using the PutFile processor. When the API returns a 200 status code, it works fine and writes the response. However, when the API returns a 400 or 500 status code, it writes the original input file instead. I want to capture and write the actual response body for 400 or 500 status codes instead of the input file. here is process:

enam_0-1734415482731.png

here is InvokeHTTP processor:

enam_1-1734415773091.png

Here is putfile processor:

enam_2-1734415833246.png

if status 200 it write the response . I want write all response from api instead of input file if it has any status from api.

Please help me

0 REPLIES 0