summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/src/utils/errors.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/src/utils/errors.ts b/frontend/src/utils/errors.ts
index a99fd0b1..f77a5e08 100644
--- a/frontend/src/utils/errors.ts
+++ b/frontend/src/utils/errors.ts
@@ -22,7 +22,8 @@ export function getLikelyErrorSourceFromValveError(error: ValveError): ErrorSour
}
export function getLikelyErrorSourceFromValveReactError(error: ValveReactErrorInfo): ErrorSource {
- return getLikelyErrorSource(error?.error?.stack + '\n' + error.info.componentStack);
+ // get the first 10 lines of the componentStack to avoid matching against the decky router wrapper for any route errors deeper in the tree
+ return getLikelyErrorSource(error?.error?.stack + '\n' + error.info.componentStack?.split("\n").slice(0, 8).join("\n"));
}
export function getLikelyErrorSource(error?: string): ErrorSource {