Skip to content

Commit

Permalink
Small note on error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed May 2, 2024
1 parent 0e68838 commit 336755d
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions ui/app/components/job-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,25 @@ export default class JobRow extends Component {

@task(function* () {
try {
yield this.args.job.latestDeployment.content.promote();
yield this.args.job.latestDeployment.content.promote(); // TODO: need to do a deployment findRecord here first.
// dont bubble up
return false;
} catch (err) {
this.handleError({
title: 'Could Not Promote Deployment',
// description: messageFromAdapterError(err, 'promote deployments'),
});
// TODO: handle error. add notifications.
console.log('caught error', err);
// this.handleError({
// title: 'Could Not Promote Deployment',
// // description: messageFromAdapterError(err, 'promote deployments'),
// });

// err.errors.forEach((err) => {
// this.notifications.add({
// title: "Could not promote deployment",
// message: err.detail,
// color: 'critical',
// timeout: 8000,
// });
// });
}
})
promote;
Expand Down

0 comments on commit 336755d

Please sign in to comment.