🚸 Ignore update typebot conflict in builder

This commit is contained in:
Baptiste Arnaud 2025-02-13 17:53:19 +01:00
parent 31bc698f5f
commit ab3caeba27
No known key found for this signature in database
2 changed files with 9 additions and 2 deletions

View File

@ -21,6 +21,11 @@ Sentry.init({
event.contexts?.trpc?.procedure_path === "typebot.importTypebot"
)
return null;
if (
exception.code === "CONFLICT" &&
event.contexts?.trpc?.procedure_path === "typebot.updateTypebot"
)
return null;
}
return event;
},

View File

@ -156,11 +156,13 @@ export const TypebotProvider = ({
const { mutateAsync: updateTypebot, isLoading: isSaving } =
trpc.typebot.updateTypebot.useMutation({
onError: (error) =>
onError: (error) => {
if (error.data?.code === "CONFLICT") return;
showToast({
title: "Error while updating typebot",
description: error.message,
}),
});
},
onSuccess: () => {
if (!typebotId) return;
refetchTypebot();