Hi ,
I have created a z odata project with GET_ENTITYSET method redefined and raising an error exception if any error or no data like below but the error is shown in reponse but not in the HTTP header in sap-message although it gives HTTP 500 error.
CALL METHOD me->/iwbep/if_mgw_conv_srv_runtime~get_message_container
RECEIVING
ro_message_container = lo_message_container.
CALL METHOD lo_message_container->add_message
EXPORTING
iv_msg_type = /iwbep/cl_cos_logger=>error
iv_msg_id = 'ZMSG'
iv_msg_number = '000'
iv_add_to_response_header = abap_true. "add the message to the header
RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception
EXPORTING message_container = lo_message_container.
Request clarification before answering.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.