Skip to Content

Suppress standard popover during oData error handling

Hello,

I'm implementing simple Fiori-like application and I have problem with oData error handling. It is based on WebIDE application template.

On the back-end system I throw business exception with some text, that I want to display on Fiori. Generally it is working fine, but there is still standard popover with message: "Sorry, a technical error occurred! Please try again later.", how can I suppress that?

Back-end code:

DATA:
  lo_message TYPE REF TO /iwbep/if_message_container,
  lx_bus_ex  TYPE REF TO /iwbep/cx_mgw_busi_exception.

lo_message = mo_context->get_message_container( ).
lo_message->add_message_text_only(
  iv_msg_type = /iwbep/if_message_container=>gcs_message_type-error
  iv_msg_text = 'Error text!' ).
   
CREATE OBJECT lx_bus_ex
  EXPORTING message_container = lo_message.

RAISE EXCEPTION lx_bus_ex.

Front-end code:

oModel.create("/ActionSet", oAction, {
  success: function() {
    // OK 
  },
  error: function(oError) {
    // Message is displayed 
    MessageToast.show(JSON.parse(oError.responseText).error.message.value);
  }
});

I would be grateful for any hint.

Kind regards,

Jakub

screen.png (5.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jul 24, 2017 at 07:53 AM

    Hi Jakub,

    Try altering the code in file ErrorHandler.js the method called is _showServiceError.

    regards

    GB

    Add comment
    10|10000 characters needed characters exceeded