mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-19 21:04:33 +08:00
🚸 Ignore update typebot conflict in builder
This commit is contained in:
parent
31bc698f5f
commit
ab3caeba27
@ -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;
|
||||
},
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user