[WEB-3195] fix: view delete toast message (#6537)

This commit is contained in:
Vamsi Krishna 2025-02-03 14:57:00 +05:30 committed by GitHub
parent c82dd6901e
commit c14fb814c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,7 @@ export const DeleteGlobalViewModal: React.FC<Props> = observer((props) => {
state: "SUCCESS",
});
})
.catch(() => {
.catch((error: any) => {
captureEvent(GLOBAL_VIEW_DELETED, {
view_id: data.id,
state: "FAILED",
@ -50,7 +50,7 @@ export const DeleteGlobalViewModal: React.FC<Props> = observer((props) => {
setToast({
type: TOAST_TYPE.ERROR,
title: "Error!",
message: "Something went wrong while deleting the view. Please try again.",
message: error?.error ?? "Something went wrong while deleting the view. Please try again.",
});
})
.finally(() => {