-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Fix Version/s: 9.10-HF33, 10.10-HF08, 11.1, 2021.0
-
Component/s: Web UI
-
Release Notes Summary:An appropriate error message is displayed when deleting an entry referenced in another vocabulary.
-
Tags:
-
Backlog priority:400
-
Sprint:l2it-11.1.6, l2it-11.1.7
Currently when a user tries to delete an entry which is referenced in another vocabulary, this error is displayed
ERROR: An error occurred while deleting this entry.
which is the same message as if any other problem occurred during the deletion.
The code to display the error message is
if (err.status === 401) { this.fire('notify', {message: this.i18n('label.error').toUpperCase() + ': ' + this.i18n('vocabularyManagement.cannotDelete.referencedEntry')}); } else { this.fire('notify', {message: this.i18n('label.error').toUpperCase() + ': ' + this.i18n('vocabularyManagement.cannotDelete.error')}); }
so the expected message could be displayed if a status coede 401 was returned but:
1) this status code is never returned
2) 401 is not relevant with this type of error
Given the fact that the correct error message is part of the HTTP response
{"entity-type":"exception","status":400,"message":"This entry is referenced in another vocabulary."}
it should be possible to display the appropriate message by testing the "message" variable.
Even if the message in the UI would change when this request will be taken into account, I don't think it will bother a lot of people and cause regressions in their functional tests.
- Is referenced in