Skip to content

Commit

Permalink
use message from request for library permissions error
Browse files Browse the repository at this point in the history
  • Loading branch information
thostetler committed Sep 25, 2020
1 parent 0765714 commit e25e1ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/js/wraps/discovery_mediator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
})
);
Expand Down

0 comments on commit e25e1ab

Please sign in to comment.