diff --git a/client/src/app/tabs/EditorTab.js b/client/src/app/tabs/EditorTab.js
index 8722ad015..4cf8562ab 100644
--- a/client/src/app/tabs/EditorTab.js
+++ b/client/src/app/tabs/EditorTab.js
@@ -7,6 +7,7 @@
import React, { PureComponent } from 'react';
+import ErrorTab from './ErrorTab';
import MultiSheetTab from './MultiSheetTab';
@@ -14,9 +15,19 @@ export function createTab(tabName, providers) {
class EditorTab extends PureComponent {
+ static getDerivedStateFromError(error) {
+ return {
+ hasError: true
+ };
+ }
+
constructor(props) {
super(props);
+ this.state = {
+ hasError: false
+ };
+
this.tabRef = React.createRef();
}
@@ -39,13 +50,15 @@ export function createTab(tabName, providers) {
} = this.props;
return (
-
+ this.state.hasError ?
+ :
+
);
}
diff --git a/client/src/app/tabs/ErrorTab.js b/client/src/app/tabs/ErrorTab.js
new file mode 100644
index 000000000..561b440ff
--- /dev/null
+++ b/client/src/app/tabs/ErrorTab.js
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Camunda Services GmbH.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import React, { PureComponent } from 'react';
+
+import css from './ErrorTab.less';
+
+import {
+ TabContainer
+} from '../primitives';
+
+
+export default class ErrorTab extends PureComponent {
+
+ triggerAction() {}
+
+ render() {
+ return (
+
+
+
+ Unexpected Error
+
+
+ An unexpected error occurred in this tab. Please click the link below to report
+ an issue on GitHub. You can also save the latest known state of the tab.
+