cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI REST sender: HTTP 500 body as JSON message instead of HTML

mgross1
Participant
0 Kudos

Hello, I have created a REST sender interface in SAP PI which input and outputs JSON. However when there is an internal error within PI it outputs HTML, example:

<html><head><title>Error</title></head>
<body><h1>Error</h1><pre>
Error while sending message to module processor: Sender Channel 'CC_TEST' (ID: 123): Catching exception calling messaging system: com.sap.aii.af.sdk.xi.srt.BubbleException: System Error Received. HTTP Status Code = 200: However System Error received in payload ErrorCode = INCORRECT_PAYLOAD_DATA ErrorCategory = XIServer Parameter1 =  Parameter2 =  Parameter3 =  Parameter4 =  Additional text =  ErrorStack = Error while processing message payload
An error occurred when deserializing in the simple transformation program /1SAI/SAS71FDBE76F93A94AF9ABF
The value '123@' is not in the value range of the XML schema type 'integer' or it does not meet the specified limitations
 [http://sap.com/xi/XI/Message/30^Error "INCORRECT_PAYLOAD_DATA"]
</pre></body></html>

Is it possible to have the same message in JSON format? I've been playing around with parameters here:

https://imgur.com/a/F6vJTKY

But I wasn't sure how to get the message there. I tried {http_result} but that doesn't work. I just got this:


{ {http_result } }
hasanordu
Discoverer
0 Kudos

Hi Michael,

I am getting the error message like below. However, the error message is not a message as in XML format. There is a missing part of the error message.

{

{message_result}

}

Accepted Solutions (0)

Answers (0)