Skip Navigation

[Request] Create a "Oops Something went wrong" page if a generator fails to load on Perchance

For me , whenever I load datasets into the Fusion Generator I have to be mindful on how many items I load into the generator upon start.

If I load too much data , or do something crazy with the HTML , then there is a risk some users ( like those who browse perchance on older phones ) will not be able to access the generator page at all.

They will get a browser error message, and will not be able to access the generator at all to report the problem. They will be locked out forever , effectively.

So my suggestion is to have some kind of default "Oops something went wrong" page when loading generators on a perchance page.

The generator owner can customize the text written on the page. Maybe the image as well.

Importantly , they should be able to direct the user to somewhere (like a discord page) where they can report the problem.

TLDR : If the generator fails to load , show a link to a "Bug Report" page

4

You're viewing a single thread.

4 comments
  • You can probably do something like this;

    <script>
      let checkForCurrentErrors = setInterval(() => {
       if(__currentPerchanceErrorCount > 0) {
         clearInterval(checkForCurrentErrors)
         errorPage.style.display = 'block';
       }
      }, 10)
    </script>
    <div id="errorPage" style="position: absolute; z-index: 999; display: none; width: 100dvw; height: 100dvh; background: blue;">
      Testing Error Page <br>
      Please Reload the Page
    </div>
    

    It is an interval that checks if there was a perchance error happened. You could also probably have a timeout in which if the page doesn't load for more than 30 seconds, then it would show the error page.

    However, these solutions only happen when the page has already been working, meaning, if they just opened up the page, it would still take the Perchance server to send the data first before it loads (where the loading issues might happen), in which case, it needs a server-side code to fire to report that the generator isn't loading.

    Depending on the error you want to handle, there might be solutions that we can code and not need the server to provide it for us.