From db92ae3bf0653ea816b79a6baab6de9d25dab8ec Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Tue, 3 Dec 2024 13:48:07 +0100 Subject: [PATCH] ui: update autoretry policy for integrations --- frontend/app/components/Client/Integrations/apiMethods.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/app/components/Client/Integrations/apiMethods.ts b/frontend/app/components/Client/Integrations/apiMethods.ts index e5115bd13..3924a068b 100644 --- a/frontend/app/components/Client/Integrations/apiMethods.ts +++ b/frontend/app/components/Client/Integrations/apiMethods.ts @@ -35,6 +35,13 @@ export function useIntegration( return initialValues; }, initialData: initialValues, + retry: (failureCount, error) => { + const status = error.status || error.response.status + if (status === 404) { + return false; + } + return failureCount < 4; + } }); const saveMutation = useMutation({