WIP triage responses and handle websocket err

This commit is contained in:
Sara
2023-11-03 13:40:53 +01:00
parent 73327d2e9e
commit 08b6d05f39
2 changed files with 12 additions and 0 deletions

View File

@@ -357,6 +357,15 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
newUrl,
);
}
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",
);
}
setStatus(message.data);
break;