Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: ignore `network error`

Abdullah Attaac659b05e491
diff --git a/apps/web/src/components/error-boundary/index.tsx b/apps/web/src/components/error-boundary/index.tsx
index 1cc7f0d0e..4afbbf416 100644
--- a/apps/web/src/components/error-boundary/index.tsx
+++ b/apps/web/src/components/error-boundary/index.tsx
@@ -33,6 +33,7 @@ import { db } from "../../common/db";
import { createDialect } from "../../common/sqlite";
import { getDeviceInfo } from "../../utils/platform";
+const IGNORED_ERRORS = ["Error in input stream", "network error"];
export function GlobalErrorHandler(props: PropsWithChildren) {
const { showBoundary } = useErrorBoundary();
@@ -45,7 +46,7 @@ export function GlobalErrorHandler(props: PropsWithChildren) {
function handleUnhandledRejection(e: PromiseRejectionEvent) {
if (
e.reason instanceof TypeError &&
- e.reason.message === "Error in input stream"
+ IGNORED_ERRORS.includes(e.reason.message)
)
return;
showBoundary(e.reason);