Skip to content

Commit

Permalink
Fix deployment failure error handling
Browse files Browse the repository at this point in the history
This is a supplement to #9831 to incorporate the extracted
missing-permissions error handling from #9909.
  • Loading branch information
backspace committed Feb 10, 2021
1 parent d98265d commit 7863650
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ui/app/components/job-page/parts/latest-deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@ export default class LatestDeployment extends Component {
try {
yield this.get('job.latestDeployment.content').fail();
} catch (err) {
let message = messageFromAdapterError(err);

if (err instanceof ForbiddenError) {
message = 'Your ACL token does not grant permission to fail deployments.';
}

this.handleError({
title: 'Could Not Fail Deployment',
description: message,
description: messageFromAdapterError(err, 'fail deployments'),
});
}
})
Expand Down

0 comments on commit 7863650

Please sign in to comment.