Skip to content

Commit b13614f

Browse files
authored
chore: improve error reporting and fix typos (#4290)
* chore: fix typos * chore(access-codes): improve error reporting * chore(discount-codes): improve error reporting
1 parent 4bbe50b commit b13614f

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

app/controllers/events/view/tickets/access-codes/create.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export default Controller.extend({
88
this.notify.success(this.l10n.t('Access code has been successfully created.'));
99
this.transitionToRoute('events.view.tickets.access-codes');
1010
})
11-
.catch(() => {
12-
this.notify.error(this.l10n.t('An unexpected error has occured. Access code cannot be created.'));
11+
.catch(e => {
12+
console.error('Error while creating access code', e);
13+
this.notify.error(this.l10n.t('An unexpected error has occurred. Access code cannot be created.'));
1314
});
1415
}
1516
}

app/controllers/events/view/tickets/access-codes/edit.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export default Controller.extend({
88
this.notify.success(this.l10n.t('Access code has been successfully updated.'));
99
this.transitionToRoute('events.view.tickets.access-codes');
1010
})
11-
.catch(() => {
12-
this.notify.error(this.l10n.t('An unexpected error has occured. Access code cannot be created.'));
11+
.catch(e => {
12+
console.error('Error while updating access code', e);
13+
this.notify.error(this.l10n.t('An unexpected error has occurred. Access code cannot be created.'));
1314
});
1415
}
1516
}

app/controllers/events/view/tickets/discount-codes/create.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export default Controller.extend({
88
this.notify.success(this.l10n.t('Discount code has been successfully created.'));
99
this.transitionToRoute('events.view.tickets.discount-codes');
1010
})
11-
.catch(() => {
12-
this.notify.error(this.l10n.t('An unexpected error has occured. Discount code cannot be created.'));
11+
.catch(e => {
12+
console.error('Error while creating discount code', e);
13+
this.notify.error(this.l10n.t('An unexpected error has occurred. Discount code cannot be created.'));
1314
});
1415
}
1516
}

app/controllers/events/view/tickets/discount-codes/edit.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export default Controller.extend({
88
this.notify.success(this.l10n.t('Discount code has been successfully updated.'));
99
this.transitionToRoute('events.view.tickets.discount-codes');
1010
})
11-
.catch(() => {
11+
.catch(e => {
12+
console.error('Error while updating discount code', e);
1213
this.notify.error(this.l10n.t('An unexpected error has occurred. Discount code cannot be updated.'));
1314
});
1415
}

0 commit comments

Comments
 (0)