[web] don't crash when server has disappeared, fix #5677
diff --git a/web/src/js/components/FlowView/Messages.tsx b/web/src/js/components/FlowView/Messages.tsx
index 4e74e05f77..89ae95cdaa 100644
--- a/web/src/js/components/FlowView/Messages.tsx
+++ b/web/src/js/components/FlowView/Messages.tsx
@@ -24,7 +24,16 @@ export default function Messages({flow, messages_meta}: MessagesPropTypes) {
         MessageUtils.getContentURL(flow, "messages", contentView, maxLines + 1),
         flow.id + messages_meta.count
     );
-    const messages = useMemo<ContentViewData[] | undefined>(() => content && JSON.parse(content), [content]) || [];
+    const messages = useMemo<ContentViewData[] | undefined>(() => {
+        if (content) {
+            try {
+                return JSON.parse(content)
+            } catch (e) {
+                const err: ContentViewData = {"description": "Network Error", lines: [[["error", `${content}`]]]};
+                return err;
+            }
+        }
+    }, [content]) || [];
 
     return (
         <div className="contentview">

Coincidentally managed to reproduce this one during testing. :)