Triage error and better websocket handling

This commit is contained in:
Sara
2023-11-03 17:15:03 +01:00
parent 08b6d05f39
commit 26330b9de2
11 changed files with 45 additions and 28 deletions

View File

@@ -350,20 +350,14 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
if (message.data.value === "ended") {
const newUrl = "/transcripts/" + transcriptId;
router.push(newUrl);
console.debug(
"FINAL_LONG_SUMMARY event:",
message.data,
"newUrl",
newUrl,
);
console.debug("FINAL_LONG_SUMMARY event:", message.data);
}
if (message.data.value === "error") {
const newUrl = "/transcripts/" + transcriptId;
router.push(newUrl);
// TODO Test
setError(
Error("Websocket error status"),
"There was an issue processing your transcript",
"There was an error processing this meeting.",
);
}
setStatus(message.data);