Skip to content

Silencing errors global

Falcion edited this page Apr 22, 2025 · 1 revision

Default silencing errors, as it is stated in it's article, silences only issues which are directly related with UNITADE's code. But sometimes, errors, which do not obstruct UX/UI in any way (except spam in console), occur not in the bandwidth of the UNITADE's codebase - for example, Monaco Editor's error of module URL, which happened in issue #119

What does it do?

In checks of error event in the application's window and checks on message, if message of an exception is in given signatures array, it would be silenced (by preventDefault() callback). There is one default signatures which are ignored (codebase may differ):

export const DEFAULT_SIGNATURES: string[] = [
    "ResizeObserver loop completed with undelivered notifications.",
];

Why this error?

While ResizeObserver error is fixable, it requires changes to the core functionality for code editor module (this observer works for "right-click" events for fenced code). It shows that you "can" optimize observer's workflow, but doesn't mean any error in particular.

How this helps me?

If you got any external errors (like connections, spamming entities and etc.), you can silence them in "obscure way", because this is NOT good if you need to do it, consider these procedures as "cursed" and as "cancer-feature".

  1. Open data.json and edit field:

    "advanced_silencing_errors": {
        "signatures": ""
    }
  2. Enter messages of your errors, not stacktrace and not full signature (ignore "Uncaught error" and etc.), split different messages with \n symbol, your input must look like this:

    "ResizeObserver loop completed with undelivered notifications.\nUnknown type of require2 void"
  3. Close and save updated data.json and open Obsidian again (do not close it);

  4. Do not touch settings of plugin and any possible data of it: open developer console (Ctrl+Shift+I on Windows) and copy+paste this code:

    await this.app.plugins.plugins.unitade.loadData();

Clone this wiki locally