I'm using a remote consumption model to consume an OData service.
I can check if an error occured w/:
CATCH /iwbep/cx_gateway INTO DATA(gateway_exception).
with the debugger I can see, that from the thrown exception, there is a previous reference of type CX_ROOT but instance is of type /IWBEP/CX_MGW_BUSI_EXCEPTION.
That exception contains the message container with further valueable detail messages. In my case that a material was not found:
I fail trying to access the previous reference because I can't upcast to /IWBEP/CX_MGW_BUSI_EXCEPTION as it is not a released object.
How can these messages be retrieved in BTP ABAP Environment?
Thank You in advance!
Hi Alrik, our recommendation is to also use the remote exception to get the error message.
CATCH /iwbep/cx_cp_remote INTO DATA(lx_remote).
" Handle remote Exception
" It contains details about the problems of your http(s) connection
CATCH /iwbep/cx_gateway INTO DATA(lx_gateway).
" Handle Exception
However, is the get_message_container method of /iwbep/cx_gateway helpful?