Monday, February 4, 2019

SAP PI REST Adapter - custom error handling

Usually need to react in some way to HTTP error code when using REST adapter.

Let`s say, that when http code 401 unathorized is received, you want to send back and xml with the error. You can do this on receiver REST adapter settings



Adapter-Specific/Error Handling

There you set

  • Source of error to HTTP Status Code
  • Status Codes to 401
  • Message Content to XML you want to send back

Or maybe you want to react to all non 200 codes with some generic error - you need to check Selection does not match and Status code to 200.


You can also set more status codes, just delimit them with comma.




No comments:

Post a Comment