refactor: streamline error handling and notification logic across various components

This commit is contained in:
Victor Santos
2025-11-03 11:12:38 -03:00
parent eba04e4278
commit 1ed59a7304
61 changed files with 843 additions and 1375 deletions
@@ -13,12 +13,8 @@ export const BackfillSecretReferenceSecretion = () => {
const handleBackfill = async () => {
if (backfillSecretReferences.isPending) return;
try {
await backfillSecretReferences.mutateAsync({ projectId: currentProject.id || "" });
createNotification({ text: "Successfully re-indexed secret references", type: "success" });
} catch {
createNotification({ text: "Failed to re-index secret references", type: "error" });
}
await backfillSecretReferences.mutateAsync({ projectId: currentProject.id || "" });
createNotification({ text: "Successfully re-indexed secret references", type: "success" });
};
const isAdmin = hasProjectRole(ProjectMembershipRole.Admin);