cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PI REST Adapter Error Response capturing

0 Likes
9,342

Dear Experts,

We are using Asynchronous REST receiver interface (using JSON conversion) for that we need to view or capture the detailed error response. In PI monitoring it only displays the error code like 400 or 404 but no further description.

But when I tried with Postman/SOAPUI detailed error message receiving.

I tried error handling with HTTP status code{http_result} and also tried useResponseErrorMessage in module but I’m unable to view the detailed error message in monitoring.

So is there any way to view detailed error message in monitoring or some other without involving new interface.

P.S. I also tried to monitor in SXMB_MONI while using useResponseErrorMessage didn't work

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hello Everyone,

Sorry for the delay and thank you for your kind answers.

But our requirement is to display the response error message (from the target) in the PI monitoring log. So this can be achieved using a parameter traceResponse with value true.

It will basically display the response message in audit log under Server response row.

Added the respective SAP Note: https://launchpad.support.sap.com/#/notes/2310654

Note : In some cases the Server response may be empty but if you look up in xpi_inspector the response log will be available. Well in our case we used Web services to consume the response.

Answers (3)

Answers (3)

christian_hamacher
Discoverer
0 Likes

well for now it looks like there are only these three:
{http_result}, {http_status} and {http_status_text}

I'm dreaming of an official doc 😉

meanwhile I found this good blog post again:

PI REST-Adapter – Error-handling | SAP Blogs

christian_hamacher
Discoverer
0 Likes

Hi Sridhar,

thanks!

it's relatively hard to find docs on what variables may be used here just as {http_result}.
I remember to also have used the complete response body here, but can't find the variable any more.

Anybody knows a complete doc on this?

The custom error handling part of the REST adapter docs doesn't even mention the use of "custom result" they're completely omitting the action configuration part 😞

Thanks in advance,

Christian

juan_vasquez2
Active Participant
0 Likes

Hello sridhar.babu.sridhar

You can use {http_result}

Then you can return the same error from your destination Server

Regards

Juan