Skip to content

Commit

Permalink
Fix deployment failure error handling (#10003)
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.

It fixes this failure on the main branch! 😳
https://app.circleci.com/pipelines/github/hashicorp/nomad/14728/workflows/4c147dca-fd1e-4de7-86aa-90ded7aabad2/jobs/137137
  • Loading branch information
backspace committed Feb 10, 2021
1 parent d98265d commit 1d0c57d
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 1d0c57d

Please sign in to comment.