diff --git a/app/components/ErrorBoundary.js b/app/components/ErrorBoundary.js index 24c087e5..e578a4e9 100644 --- a/app/components/ErrorBoundary.js +++ b/app/components/ErrorBoundary.js @@ -55,7 +55,26 @@ class ErrorBoundary extends React.Component { render() { if (this.error) { + const error = this.error; const isReported = !!window.Sentry && env.DEPLOYMENT === "hosted"; + const isChunkError = this.error.message.match(/chunk/); + + if (isChunkError) { + return ( + + +

Loading Failed

+ + Sorry, part of the application failed to load. This may be because + it was updated since you opened the tab or because of a failed + network request. Please try reloading. + +

+ +

+
+ ); + } return ( @@ -66,7 +85,7 @@ class ErrorBoundary extends React.Component { {isReported && " – our engineers have been notified"}. Please try reloading the page, it may have been a temporary glitch. - {this.showDetails &&
{this.error.toString()}
} + {this.showDetails &&
{error.toString()}
}

{" "} {this.showDetails ? (