Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show error message on delete #4378

Conversation

petrjasek
Copy link
Member

No description provided.

@@ -97,6 +97,14 @@ export function connectCrudManagerHttp<Props, Entity extends IBaseRestApiRespons
.then(() => this.refresh())
.then(() => {
notify.success(gettext('The item has been deleted.'));
})
.catch((reason) => {
if (reason != null && reason.message != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also use a shorthand reason?.message != null instead

@petrjasek petrjasek added this to the 2.7 milestone Nov 15, 2023
@petrjasek petrjasek merged commit 30434e2 into superdesk:authoring-react-post-broadcasting Nov 16, 2023
6 checks passed
@petrjasek petrjasek deleted the crud-manager-delete-error-message branch November 16, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants