diff options
| author | AAGaming <aagaming@riseup.net> | 2024-08-20 14:55:59 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-08-20 14:55:59 -0400 |
| commit | 7c9b68c1ddada6d978ecf8f0d0e274580e72d842 (patch) | |
| tree | c0ec4bbfc85616161223a31454e77e50c1ee8fdb /frontend | |
| parent | e5e75cc16e01b9d23a483b9504e3d44e2e8756bd (diff) | |
| download | decky-loader-7c9b68c1ddada6d978ecf8f0d0e274580e72d842.tar.gz decky-loader-7c9b68c1ddada6d978ecf8f0d0e274580e72d842.zip | |
only grab the first 8 lines of the component stack
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/src/utils/errors.ts | 3 |
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 { |
