fix(errorHandler): suppress NG03402 error on app exit

Closes #5644

NG03402 (BrowserAnimationsModule not imported) often occurs when the app is shutting down (e.g. via Electron) while an animation is active or pending. This is a harmless artifact of the teardown process. We now log a warning instead of showing the global error dialog.
This commit is contained in:
Johannes Millan 2025-12-04 10:56:09 +01:00
parent 48ce0e3731
commit c2ba004e2f

View file

@ -22,6 +22,12 @@ export class GlobalErrorHandler implements ErrorHandler {
// TODO Cleanup this mess
async handleError(err: unknown): Promise<void> {
const errStr = typeof err === 'string' ? err : String(err);
// Suppress known error NG03402 which often happens when exiting the app while an animation is running
if (errStr.includes('NG03402')) {
Log.warn('Suppressing NG03402 error:', err);
return;
}
// eslint-disable-next-line
let simpleStack = '';
if (