From f8205b7b4a6f9ec5a7ce0546b67aa0f6cbf54eef Mon Sep 17 00:00:00 2001
From: ThibG
Date: Mon, 14 Sep 2020 15:05:22 +0200
Subject: [PATCH] [Glitch] Add paragraph about browser add-ons when
encountering some errors
Port b67caf9be48294bef290eea69e90d98223fcf3eb to glitch-soc
Signed-off-by: Thibaut Girka
---
.../flavours/glitch/components/error_boundary.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/javascript/flavours/glitch/components/error_boundary.js b/app/javascript/flavours/glitch/components/error_boundary.js
index 8998802b1b..8e6cd14617 100644
--- a/app/javascript/flavours/glitch/components/error_boundary.js
+++ b/app/javascript/flavours/glitch/components/error_boundary.js
@@ -48,6 +48,8 @@ export default class ErrorBoundary extends React.PureComponent {
if (!hasError) return this.props.children;
+ const likelyBrowserAddonIssue = errorMessage && errorMessage.includes('NotFoundError');
+
let debugInfo = '';
if (stackTrace) {
debugInfo += 'Stack trace\n-----------\n\n```\n' + errorMessage + '\n' + stackTrace.toString() + '\n```';
@@ -70,6 +72,14 @@ export default class ErrorBoundary extends React.PureComponent {
+ { likelyBrowserAddonIssue && (
+ -
+
+
+ ) }
-