Need to Customize message for unhandled Error feedback Messages.

Hi All,

We are working on a web application which is a user enrollment journey. We are using OutSystems 10.

OutSystems shows a feedback error popup of there is any error in client script or connection to the server lost. We have added an invalid javascript for testing purpose. Below is the screen shot for reference - 

Other example for such error is "Connection to the server lost" 

We need to handle such exceptions and display a customized error message to the user. I am unable to locate from where this feedback popup comes and where are the generalized exceptions are handled. 

Please provide some details around this.

Thanks,

Unnati Khanorkar


You can set your global exception handler.


Default exception handlers are in your theme, but you can make your own.

Stefano Valente wrote:

You can set your global exception handler.


Default exception handlers are in your theme, but you can make your own.

Hi Stefano,

Below is the screen shot for global exception handler. 

I am debugging this but the error feedback I am asking about is not handled here.

Hello Unnati,

This is part of the Feedback Message from Richwidgets.

The code that triggers this is in the Feedback_Message.en.js file:

var RichWidgets_Feedback_Message_errorTrapped = false;
function RichWidgets_Feedback_Message_ErrorHandler(event, exception) {
    outsystems.internal.$(function($){
        if(!RichWidgets_Feedback_Message_UnloadingState)    {
            if (!RichWidgets_Feedback_Message_errorTrapped)
                OsNotifyWidget(RichWidgets_Feedback_Message_notifyWidget, "3 An exception occurred in the client script.\n Error: " + (exception.message == ''? exception : exception.message) );
            RichWidgets_Feedback_Message_errorTrapped = true;
        } else {
            RichWidgets_Feedback_Message_UnloadingState = false;
        }
    });
}

So, you can clone the Feedback_Message block and the action in the Server tab, adapt the javascript and use it instead of the provided by OutSystems, or you can use one of the Feedback messages components from Forge instead from the one of Richwidgets and adapt them.

Hope this can help.

Cheers.

Eduardo Jauch wrote:

Hello Unnati,

This is part of the Feedback Message from Richwidgets.

The code that triggers this is in the Feedback_Message.en.js file:

var RichWidgets_Feedback_Message_errorTrapped = false;
function RichWidgets_Feedback_Message_ErrorHandler(event, exception) {
    outsystems.internal.$(function($){
        if(!RichWidgets_Feedback_Message_UnloadingState)    {
            if (!RichWidgets_Feedback_Message_errorTrapped)
                OsNotifyWidget(RichWidgets_Feedback_Message_notifyWidget, "3 An exception occurred in the client script.\n Error: " + (exception.message == ''? exception : exception.message) );
            RichWidgets_Feedback_Message_errorTrapped = true;
        } else {
            RichWidgets_Feedback_Message_UnloadingState = false;
        }
    });
}

So, you can clone the Feedback_Message block and the action in the Server tab, adapt the javascript and use it instead of the provided by OutSystems, or you can use one of the Feedback messages components from Forge instead from the one of Richwidgets and adapt them.

Hope this can help.

Cheers.

Thanks Eduardo. This was helpful.:)