Skip to content

Commit

Permalink
added response detail to configuration error toast (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
opaduchak authored Dec 16, 2024
1 parent 842d63d commit 43f6d94
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,16 @@ export default class AddonsServiceManagerComponent extends Component<Args> {
}
this.cancelSetup();
} catch(e) {
this.toast.error(this.intl.t('addons.configure.error', {
const baseMessage = this.intl.t('addons.configure.error', {
configurationName: this.selectedConfiguration?.displayName,
}));
});
if (e.errors && e.errors[0].detail) {
const apiMessage = e.errors[0].detail;
this.toast.error(`${baseMessage}: ${apiMessage}`);
} else {
this.toast.error(baseMessage);
}

}
}

Expand Down

0 comments on commit 43f6d94

Please sign in to comment.