From 7c9b68c1ddada6d978ecf8f0d0e274580e72d842 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Tue, 20 Aug 2024 14:55:59 -0400 Subject: only grab the first 8 lines of the component stack --- frontend/src/utils/errors.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'frontend/src/utils/errors.ts') 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 { -- cgit v1.2.3