When using viewer.js code in an iframe (`web/viewer.html?file=my.pdf"`) and getting a load error like `Error: file origin does not match viewer's` how do I catch this error?  The console reports `app.js:2140 Uncaught (in promise) Error: file origin does not match viewer's`.  I have setup the load listener and am using the `PDFViewerApplication.initializedPromise`.  I was hoping the `PDFViewerApplication.initializedPromise` would reject, but it does not.  I could not find an eventbus event to listen to specifically for load errors either.

I would like to programmatically detect such load errors and dynamically remove the iframe hosting the pdf viewer and instead replace it with my own error messaging.  I can't figure out how to do that.

Configuration:
- Any, but testing on Chrome 97.0.4692.71 64-bit
- Ubuntu 20.04
- PDF.js version:  v2.12.313
- Is a browser extension: No

Steps to reproduce the problem:
1.  Purposely try to load a PDF in a way that would cause the `app.js:2140 Uncaught (in promise) Error: file origin does not match viewer's` error.
* @private
   */
  async _readPreferences() {
    if (
      typeof PDFJSDev === "undefined" ||
      PDFJSDev.test("!PRODUCTION || GENERIC")
    ) {
      if (AppOptions.get("disablePreferences")) {
        
        
        return;
      }
      if (AppOptions._hasUserOptions()) {
        console.warn(
          "_readPreferences: The Preferences may override manually set AppOptions; " +
            'please use the "disablePreferences"-option in order to prevent that.'
        );
      }
    }
    try {
      AppOptions.setAll(await this.preferences.getAll());
    } catch (reason) {
      console.error(`_readPreferences: "${reason?.message}".`);
    }
  },
  /**
   * Potentially parse special debugging flags in the hash section of the URL.
   * @private
   */
  async _parseHashParameters() {