cancel
Showing results for 
Search instead for 
Did you mean: 

Error Response to Sender

09-23-2021 3:09 PM
1959 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

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!

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

mattileydecker
Product and Topic Expert
Product and Topic Expert
0 Likes

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

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Christian,

I do not think this is possible. (Though i am not an expert in this topic).

You can may be send an email in exception sub process.

Best Regards, Ajit