Skip to Content
0

Suppress standard popover during oData error handling

Jul 24, 2017 at 07:34 AM

52

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

Hi Jakub,

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

regards

GB

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Great! I've adjusted ErrorHandler.js and it is working now.

0