From e25e1ab96e96d4851b558f140dc70d97fa182a65 Mon Sep 17 00:00:00 2001 From: Tim Hostetler <6970899+thostetler@users.noreply.github.com> Date: Fri, 25 Sep 2020 11:18:11 -0400 Subject: [PATCH] use message from request for library permissions error --- src/js/wraps/discovery_mediator.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/wraps/discovery_mediator.js b/src/js/wraps/discovery_mediator.js index 8c71c6fe4..688493f35 100644 --- a/src/js/wraps/discovery_mediator.js +++ b/src/js/wraps/discovery_mediator.js @@ -117,6 +117,7 @@ define([ var target = apiRequest.get('target'); errorDetails.target = target; errorDetails.query = apiRequest.get('query').toJSON(); + console.log(xhr, apiRequest, errorDetails); switch (xhr.status) { case 403: @@ -131,9 +132,11 @@ define([ new ApiFeedback({ code: ApiFeedback.CODES.ALERT, msg: - 'We are sorry, you do not have permission to access: ' + - target + - '. This is likely our fault (misconfiguration) and the ADS team has been notified.', + xhr.responseJSON && xhr.responseJSON.error + ? xhr.responseJSON.error + : 'We are sorry, you do not have permission to access: ' + + target + + '. This is likely our fault (misconfiguration) and the ADS team has been notified.', modal: true, }) );