diff --git a/frontend/src/models/workspace.js b/frontend/src/models/workspace.js
index fc54e9147a6302fcb04db86a7ac97f28c071c57a..2990e55410bcce75d109bac90706f9c8a64af64c 100644
--- a/frontend/src/models/workspace.js
+++ b/frontend/src/models/workspace.js
@@ -66,6 +66,7 @@ const Workspace = {
       body: JSON.stringify({ message, mode }),
       headers: baseHeaders(),
       signal: ctrl.signal,
+      openWhenHidden: true,
       async onopen(response) {
         if (response.ok) {
           return; // everything's good
@@ -74,8 +75,26 @@ const Workspace = {
           response.status < 500 &&
           response.status !== 429
         ) {
+          handleChat({
+            id: v4(),
+            type: "abort",
+            textResponse: null,
+            sources: [],
+            close: true,
+            error: `An error occurred while streaming response. Code ${response.status}`,
+          });
+          ctrl.abort();
           throw new Error("Invalid Status code response.");
         } else {
+          handleChat({
+            id: v4(),
+            type: "abort",
+            textResponse: null,
+            sources: [],
+            close: true,
+            error: `An error occurred while streaming response. Unknown Error.`,
+          });
+          ctrl.abort();
           throw new Error("Unknown error");
         }
       },
@@ -95,6 +114,7 @@ const Workspace = {
           error: `An error occurred while streaming response. ${err.message}`,
         });
         ctrl.abort();
+        throw new Error();
       },
     });
   },