From 26330b9de243bcbe4862e6c3b86188ba8720b4e5 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 3 Nov 2023 17:15:03 +0100 Subject: [PATCH] Triage error and better websocket handling --- www/app/(errors)/errorContext.tsx | 3 --- www/app/[domain]/browse/pagination.tsx | 2 +- .../[domain]/transcripts/[transcriptId]/page.tsx | 2 +- www/app/[domain]/transcripts/recorder.tsx | 2 +- www/app/[domain]/transcripts/useMp3.ts | 14 +++++++------- www/app/[domain]/transcripts/useTopics.ts | 8 +++++++- www/app/[domain]/transcripts/useTranscript.ts | 13 ++++++++++--- www/app/[domain]/transcripts/useWaveform.ts | 10 ++++++++-- www/app/[domain]/transcripts/useWebSockets.ts | 10 ++-------- www/app/lib/edgeConfig.ts | 2 +- www/app/lib/errorUtils.ts | 7 +++++++ 11 files changed, 45 insertions(+), 28 deletions(-) create mode 100644 www/app/lib/errorUtils.ts diff --git a/www/app/(errors)/errorContext.tsx b/www/app/(errors)/errorContext.tsx index e3e58ea5..d541c6f0 100644 --- a/www/app/(errors)/errorContext.tsx +++ b/www/app/(errors)/errorContext.tsx @@ -28,9 +28,6 @@ export const ErrorProvider: React.FC = ({ children }) => { const declareError = (error, humanMessage?) => { setError(error); setHumanMessage(humanMessage); - console.log(error.message, { ...error }); - //TODO ignore not found in request errors (in useTopics, useTranscript...) - // if (error.name == ResponseError && error.response.status == 404) }; return (