Catch "java.lang.Exception: Error Deserializing ViewState" error

Good day Community!

May I ask if there is a chance that we can catch/exception handling specifically for the "java.lang.Exception: Error Deserializing ViewState" error? Since there is no way to prevent it, I just wanted to throw a human readable exception when the end-users experience/redirected to this error.

I deployed some urgent updates/changes in our production environment awhile ago (afternoon). Due to the new changes and updates in the server, a lot of our end-users experienced the error. 

I think some end-users were still in the "old version" of the screen when they submitted a request that's why this error occurred. They didn't refresh the page or logout yet after the changes were successfully deployed.

Here is an old post and an explanation about this kind of error. 


Kind regards,


Hi Louise, you're right. This error happens when a module is published with changes to a page that is currently being viewed by an user (opened on the browser). As the page has been changed, the View State will be different, and the platform cannot reuse the previews state.