diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json
index 4a4fdd94f9..35f272b27e 100644
--- a/services/web/frontend/extracted-translations.json
+++ b/services/web/frontend/extracted-translations.json
@@ -32,6 +32,7 @@
"change_owner": "",
"change_project_owner": "",
"chat": "",
+ "chat_error": "",
"checking_dropbox_status": "",
"checking_project_github_status": "",
"clear_cached_files": "",
@@ -241,6 +242,7 @@
"recent_commits_in_github": "",
"recompile": "",
"recompile_from_scratch": "",
+ "reconnect": "",
"reference_error_relink_hint": "",
"refresh": "",
"refresh_page_after_linking_dropbox": "",
diff --git a/services/web/frontend/js/features/chat/components/chat-fallback-error.js b/services/web/frontend/js/features/chat/components/chat-fallback-error.js
new file mode 100644
index 0000000000..c79b0ed439
--- /dev/null
+++ b/services/web/frontend/js/features/chat/components/chat-fallback-error.js
@@ -0,0 +1,29 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+import { useTranslation } from 'react-i18next'
+import { Button, Alert } from 'react-bootstrap'
+
+function ChatFallbackError({ reconnect }) {
+ const { t } = useTranslation()
+
+ return (
+
+ )
+}
+
+ChatFallbackError.propTypes = {
+ reconnect: PropTypes.any,
+}
+
+export default ChatFallbackError
diff --git a/services/web/frontend/js/features/chat/components/chat-pane.js b/services/web/frontend/js/features/chat/components/chat-pane.js
index ba40859124..a67670874f 100644
--- a/services/web/frontend/js/features/chat/components/chat-pane.js
+++ b/services/web/frontend/js/features/chat/components/chat-pane.js
@@ -5,10 +5,12 @@ import { useTranslation } from 'react-i18next'
import MessageList from './message-list'
import MessageInput from './message-input'
import InfiniteScroll from './infinite-scroll'
+import ChatFallbackError from './chat-fallback-error'
import Icon from '../../../shared/components/icon'
import { useLayoutContext } from '../../../shared/context/layout-context'
import { useApplicationContext } from '../../../shared/context/application-context'
import withErrorBoundary from '../../../infrastructure/error-boundary'
+import { FetchError } from '../../../infrastructure/fetch-json'
import { useChatContext } from '../context/chat-context'
function ChatPane() {
@@ -26,8 +28,10 @@ function ChatPane() {
atEnd,
loadInitialMessages,
loadMoreMessages,
+ reset,
sendMessage,
markMessagesAsRead,
+ error,
} = useChatContext()
useEffect(() => {
@@ -43,6 +47,14 @@ function ChatPane() {
0
)
+ if (error) {
+ // let user try recover from fetch errors
+ if (error instanceof FetchError) {
+ return
+ }
+ throw error
+ }
+
return (