From 255e5d236224debff0cfeac64178a28b2739b477 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 30 Nov 2023 08:16:29 -0400 Subject: [PATCH] Fix some cases that were not considering both message and description when displaying errors. (#7517) --- .../resources/catalog/components/search/mdview/mdviewModule.js | 2 +- .../catalog/components/search/resultsview/SelectionDirective.js | 2 +- .../validationtools/GnmdInspireValidationDirective.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web-ui/src/main/resources/catalog/components/search/mdview/mdviewModule.js b/web-ui/src/main/resources/catalog/components/search/mdview/mdviewModule.js index a243036000c..f0c1229100b 100644 --- a/web-ui/src/main/resources/catalog/components/search/mdview/mdviewModule.js +++ b/web-ui/src/main/resources/catalog/components/search/mdview/mdviewModule.js @@ -196,7 +196,7 @@ // Data needs improvements // See https://github.com/geonetwork/core-geonetwork/issues/723 gnAlertService.addAlert({ - msg: reason.data.description, + msg: reason.data.message || reason.data.description, type: "danger" }); } diff --git a/web-ui/src/main/resources/catalog/components/search/resultsview/SelectionDirective.js b/web-ui/src/main/resources/catalog/components/search/resultsview/SelectionDirective.js index f9f16d196e6..3f645d03f93 100644 --- a/web-ui/src/main/resources/catalog/components/search/resultsview/SelectionDirective.js +++ b/web-ui/src/main/resources/catalog/components/search/resultsview/SelectionDirective.js @@ -96,7 +96,7 @@ }, function (r) { gnAlertService.addAlert({ - msg: r.data.description, + msg: r.data.message || r.data.description, delay: 20000, type: "danger" }); diff --git a/web-ui/src/main/resources/catalog/components/validationtools/GnmdInspireValidationDirective.js b/web-ui/src/main/resources/catalog/components/validationtools/GnmdInspireValidationDirective.js index 7f40ff3a3aa..41aff20e788 100644 --- a/web-ui/src/main/resources/catalog/components/validationtools/GnmdInspireValidationDirective.js +++ b/web-ui/src/main/resources/catalog/components/validationtools/GnmdInspireValidationDirective.js @@ -143,7 +143,7 @@ }); } else { gnAlertService.addAlert({ - msg: error.data.description, + msg: error.data.message || error.data.description, type: "danger" }); }