cancel
Showing results for 
Search instead for 
Did you mean: 

Error Response to Sender

0 Kudos
766

Hello!

I have a question in SCPI

I have an IFLOW HTTP - HTTP, if the sending fails I have an "Exception Subprocess" that sends the error that occurred to the sender. (Ex: I send by POSTMAN and with this "Exception Subprocess" I get the type of error that I had in the sending, 400,401,403 ... and the text of the error).

I have a "content Modifier" with a body, importing the header and the exception message inside the "Exception Subprocess".

But the IFlow (failed) is showing on my monitor as "completed" I think it is because I am sending the error that I had.

Is there a way that after sending the error message (because it has failed) the IFLOW will show as failed?

Example:

If I change in my "Exception Subprocess" the "End1" for an "Error end event" and I have (For example) an error 400 I have my Iflow in Error (Correct), but the sender receives an error 500, if I have the "End1 "I have the Iflow" Completed "but the sender receives the correct code. I need if it fails (for example) with an error 400, my Iflow shows error (400) and the sender (POSTMAN) receives error 400.

Thanks!

Best Regards!

View Entire Topic
mattisebastian
Advisor
Advisor
0 Kudos

Hi,

using this answer: https://community.sap.com/t5/technology-q-a/how-to-send-http-status-code-using-cloud-platform-integr...

You can set any HTTP response code in your error handling. Just set the header CamelHttpResponseCode with 200, 400 etc.

Best regards
Matti