From 26c0207690ce9e6362f976a31d0ce6963bb84ab6 Mon Sep 17 00:00:00 2001 From: Hamza Mahjoubi Date: Mon, 27 Jan 2025 22:15:27 +0700 Subject: [PATCH] fix: throwing errors in ai intergration frontend service Signed-off-by: Hamza Mahjoubi --- src/service/AiIntergrationsService.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/service/AiIntergrationsService.js b/src/service/AiIntergrationsService.js index a43f98f003..84f8c06f05 100644 --- a/src/service/AiIntergrationsService.js +++ b/src/service/AiIntergrationsService.js @@ -9,7 +9,9 @@ export const summarizeThread = async (threadId) => { try { const resp = await axios.get(url) - if (resp.status === 204) throw convertAxiosError() + if (resp.status === 204) { + throw new Error('Thread summary failed, error in the llm service') + } return resp.data.data } catch (e) { throw convertAxiosError(e) @@ -36,7 +38,9 @@ export const smartReply = async (messageId) => { try { const resp = await axios.get(url) - if (resp.status === 204) throw convertAxiosError() + if (resp.status === 204) { + throw new Error('Thread summary failed, error in the llm service') + } return resp.data } catch (e) { throw convertAxiosError(e)