From 5a98f55024215da77fcc57be6541d4a22bbee754 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Jan 2025 18:58:02 +0300 Subject: [PATCH] fix: suppress error toast for update notifications (#38709) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Prevents error toasts for errors designed to show update notification toasts. ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 444b42858eece8b8454283480e5b72d96aee4290 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Thu, 16 Jan 2025 15:41:29 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Bug Fixes** - Updated error handling mechanism for bad request errors - Refined version mismatch error processing --- .../response/failureHandlers/handleBadRequestError.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/client/src/api/interceptors/response/failureHandlers/handleBadRequestError.ts b/app/client/src/api/interceptors/response/failureHandlers/handleBadRequestError.ts index e7aa3f3f33..82e272325a 100644 --- a/app/client/src/api/interceptors/response/failureHandlers/handleBadRequestError.ts +++ b/app/client/src/api/interceptors/response/failureHandlers/handleBadRequestError.ts @@ -12,18 +12,10 @@ export const handleBadRequestError = async (error: AxiosError) => { SERVER_ERROR_CODES.VERSION_MISMATCH.includes("" + errorCode) ) { const responseData = error?.response?.data; - const message = responseData?.responseMeta.error?.message; const serverVersion = (responseData?.data as { serverVersion: string }) .serverVersion; handleVersionMismatch(getAppsmithConfigs().appVersion.id, serverVersion); - - return Promise.reject({ - ...error, - clientDefinedError: true, - statusCode: errorCode, - message, - }); } return null;