Raise Exeption Not Firing to Common/OnException
Application Type
Service Studio Version
11.54.22 (Build 62709)
Platform Version
11.23.0 (Build 40636)

I'm trying to implement maintenance feature. I have created a system client action OnApplicationReady which is checking a site property. If the site property is True, the action is rasing a new User Exception.

I'm handling this exception in Interface/Common/OnExeption action. Exception is raising from OnApplicationReady but not reaching Interface/Common/OnExeption. It's just showing a error page. But it should show me my custom maintenance page.

Can anyone solve me this issue ?

Hello Nour,

I think this is happening because OnApplicationReady is run before loading module so that why exception not going to OnException of your module.

Also you can check documentation of OnApplicationReady here

I think you can check this site property and raise exception in a common area of your application for example into header of pages like userinfo or menu block 

Agree with @Mostafa Othman ,

the OnException is there to handle exceptions coming from any of your UI flows, this OnApplicationReady is completely outside of that.

It is also asynchronous, you can't really count on it running and finishing before your UI starts loading.  It also only runs on your home module, so if users have links to screens in other modules, they could still see the screen, even when in maintenance mode.  

So not at all the good spot to do what you want to do.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.