Sometimes app not loading, blank page. need to be refreshed

Hi everyone!

I have an issue with my vuejs app that uses history mode. Sometimes on watch or sometimes on production app does not load properly and it does display a blank page. However, I have some custom error handler to handle if it could not find the element (which is there) then render a message and ask user to reload the page

But finally, the error is still there. Sometimes when user comes to app page, it remains blank until user refreshes the page and then entire app loads. Do you have any idea how I can handle it? so if it does not display the app, then just ask user to reload it?