Show TOC

Error Response Control for Backend Data ProviderLocate this document in the navigation structure

Use

The response of an OData request causing an error looks like this example:

Example

Example

This error response contains the following artifacts:

  • Error code

    The T100 message class and number of the error message.

    In this example it is /IWBEP/CM_TEA/004.

  • Error message

    The text of the error message.

    In this example it is Team ID 'TEAM_012345678' is not in the defined range.

  • Transaction Id

    This ID identifies traces belonging to one transaction on all involved systems.

    In this example it is 4FDF3748112322F4E10000000A420C41.

  • One or several error detail entries which each contains:

    • Inner error code

      The T100 message class and number of the error message or the name of the exception class that contributed this error. In this example it is /IWBEP/CM_TEA/004.

    • Inner error message

      The text of the error message.

      In this example it is Team ID 'TEAM_012345678' is not in the defined range.

    • Property reference

      The XPATH expression (entity type / property name) pointing to the corresponding property for this message if available. In this example it is Team/Team_Identifier or empty.

    • Severity

      Possible severities are info, warning and error. In this example it is error.

A backend data provider can control this error by the exception it raises and optionally also by adding messages to the message container of the raised exception.

To trigger an error a backend data provider application raises a business exception or a technical exception:

  • A business exception is class /IWBEP/CX_MGW_BUSI_EXCEPTION or a class inheriting from it.

  • A technical exception is class /IWBEP/CX_MGW_TECH_EXCEPTION or a class inheriting from it.

Each exception of the exception chain (provided by the previous exception when raising a business or technical exception) will be mapped to an error detail entry, as shown in the following example.

            <errordetail>    
    <code>/IWBEP/CX_TEA_BUSINESS</code>
    <message>'TEAM_012345678' is not a valid ID.</message>    
    <propertyref/>    
    <severity>error</severity>
</errordetail>
         

A backend data provider can also use the message container (interface /IWBEP/IF_MESSAGE_CONTAINER) to add one or several messages to the exception it raises.