Skip to Content
1
Dec 23, 2022 at 07:48 PM

REST Sender/Receiver - handling non-200 HTTP status code gracefully

376 Views

Hi,

I have a scenario like REST sender Adapter (JSON input) to PO 7.5 SP17 to REST Receiver (SAP ECC ODATA service).

on the receiver side, when HTTP POST operation is successful then receiver ODATA service returns HTTP status code 201 but on sender system gets HTTP status code as 200 (this works fine in POSTMAN though).

same for all error related codes, for example 400, 500, 404, etc.. (PO system doesn't return these codes to sender unless error handling)

At present, I have handled HTTP status code 201 and all failure HTTP status codes through the error handling tab in REST receiver and sender channels using standard variables {http_result} and {message_result} variables respectively, no issue here.

my question is, is there any standard mechanism SAP has provided instead of using such custom logic which is painful during maintenance and support as well??? I am using PO 7.5 SP17.

here the requirement is, for all non-200 status codes, sender side should get same non-200 status code with exact payload form receiver side.

NOTE: I have already gone through some of the existing blogs and forums for the same discussion but none is confirming my requirement so have raised it again.

it seems this is very common requirement in almost every REST/ODATA based scenarios so SAP might have thought something on this already and released.

Thank you in advance.

Regards,

Jagesh Lakdawala