Skip to content

Commit

Permalink
Broadcasting error when delete record (#8212)
Browse files Browse the repository at this point in the history
Show a warning to the user when an error happens while deleting one 
or more metadata records.
  • Loading branch information
wangf1122 authored Jul 9, 2024
1 parent b5c29b8 commit 4b9864a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@
deferred.resolve(data);
},
function (data) {
gnAlertService.addAlert({
msg: data.data.message || data.data.description,
type: "danger"
});
deferred.reject(data);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
},
function (reason) {
$rootScope.$broadcast("StatusUpdated", {
title: reason.data.description, //returned error JSON obj
title: reason.data.message, //returned error JSON obj
error: reason.data.description,
timeout: 0,
type: "danger"
});
Expand Down

0 comments on commit 4b9864a

Please sign in to comment.