We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7929ff commit f8cf8c1Copy full SHA for f8cf8c1
app/controllers/orders/pending.js
@@ -130,10 +130,17 @@ export default Controller.extend({
130
})
131
.catch(e => {
132
console.warn(e);
133
- this.notify.error(this.l10n.t('An unexpected error has occurred'),
134
- {
135
- id: 'unexpected_error_occur'
136
- });
+ if ('errors' in e) {
+ this.notify.error(this.l10n.tVar(e.errors[0].detail),
+ {
+ id: 'unexpected_error_occur'
137
+ });
138
+ } else {
139
+ this.notify.error(this.l10n.tVar(e),
140
141
142
143
+ }
144
145
.finally(() => {
146
this.set('isLoading', false);
0 commit comments