Skip to content

Commit

Permalink
Merge pull request #2069 from thostetler/fix-library-permission-message
Browse files Browse the repository at this point in the history
use message from request for library permissions error
  • Loading branch information
ehenneken authored Sep 25, 2020
2 parents 0765714 + e25e1ab commit a582565
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 a582565

Please sign in to comment.