Skip to content

Commit

Permalink
fix: Fix error message when attempting to delete home page posts with…
Browse files Browse the repository at this point in the history
…out permissions
  • Loading branch information
Salman-Apptware committed Jan 19, 2024
1 parent 1d0e9f1 commit 0e63c2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function CreatePostModal({ onClose, onCreate }: Props) {
})
.catch((e) => {
message.destroy();
message.error({ content: 'Failed to create Post! An unknown error occured.', duration: 3 });
message.error({ content: 'Failed to create Post! Unauthorized to perform this action.', duration: 3 });
console.error('Failed to create Post:', e.message);
});
onClose();
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/src/app/settings/posts/PostItemMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function PostItemMenu({ title, urn, onDelete }: Props) {
})
.catch(() => {
message.destroy();
message.error({ content: `Failed to delete Post!: An unknown error occurred.`, duration: 3 });
message.error({ content: `Failed to delete Post!: Unauthorized to perform this action.`, duration: 3 });
});
};

Expand Down

0 comments on commit 0e63c2c

Please sign in to comment.