Is there a some default action in Outsystems to handle int errors in Pop Ups ?

So i am trying to figure out a way to handle with all pop up exceptions when internal errors occur inside pop ups, particularly in Lisbon Theme. The reason is, when this type of errors happen, just like has been reported, going back tends to open a new app window inside the pop up. 

I found some reports about this on the community but not the answer i have been looking for, so  am i looking for something that does not exists or does some one knows a way?

Thank you

I know its not an answer but try to prevent errors bubbling up to your popup, handle them in lower level mods and return errors in return vars iso just generating exceptions. 



Hello JT, 

A "server" error (Internal Error) will happen on a request to the Server, usually (if not always), on a navigate (that you probably shouldn't do in a popup, anyway), and when calling Screen Actions.

Just be sure that you have at least the "AllExceptions" Exception Handler on all Screen Actions. That way, if an exception is raised, this exception handler will be triggered, not the Global Exception Handler (that usually navigates to another screen, what you want to avoid).


Thank you for both answers.

As for Eduardo solution, i understand what you said, but the issue here is not to avoid exceptions but what happens when they do occur, in this case they always open a new windows inside the pop up, i know that to prevent that i can use Exception Handlers to close the pop up. The idea was to avoid doing that in every server action in the pop ups and have a Global Exception Handler to fix that, but the Global Handler is incapable of closing pop ups. 


As for now, it is not possible (afaik) to achieve what you want.
Once you hit the Global Exception Handler, you don't have a way to close the popup, as the exception handlers in the Global Exception Handler (on O11 at least), need to be redirected to a screen.

I think the only way is to have Exception Handlers in the SCREEN ACTIONS (there's no need to have them in Server Actions), and close the Popup, or just send a message to the user alerting for the error.


If you want to avoid being redirected to an error page for hitting the Global Exception Handler, you have to implement Exception Handling in your pages, including the Popup ones.


Thank you for the answer Eduardo. 

So for the record, there is no way to prevent a new webscreen opening inside the pop up after an internal error, unless an exception handler is raised inside the pop up server action?

Hi JT,

You could "disable" the Global Exception Handler, but the only thing you would gain is to avoid the Internal Error from appearing, while the user would not know that something happened.

So, as far as I know, there is no other way.


I hope you didn't indeed disable the global exception handler :)



Dont give me ideas! :)


So just you know, i found a way to bypass my problem.

I added a preparation in the internal error page with a close pop up and a feedback message of the error, so no longer pages are opened inside a pop up.

So i guess there is always a workaround...


Hi JT,

Just a question.

What will happen if the internal error is called from a page that is not a Popup?



I really don't agree with this solution, JT.

It will probably give you a second error client side due to the execution of the Popup_Editor_Close in a case where the page is not a popup, besides the fact that you are navigating to a page as an endpoint that you don't want to show (for me, a conceptual error).

I still advocate taking care of exceptions in the Popup, where you can provide the option for the user to fix whatever is causing the problem and try again, for example, provide a nice message personalised, etc.

That is true, but i can have all my pop ups in one flow and add an exception handler to that flow, that way everything works fine, pages have one behavior and pop ups have another. Most importantly, no pages loading inside pop ups anymore!

Thank you again for all the input, much appreciated!

You can also run your custom JS in the preparation to avoid that second error on the client side replacing the original error:

SyntaxEditor Code Snippet

"if (typeof parent.RichWidgets_Popup_Editor_Close != 'undefined') {