Skip to content

chore: improve error reporting and fix typos #4290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/controllers/events/view/tickets/access-codes/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ export default Controller.extend({
this.notify.success(this.l10n.t('Access code has been successfully created.'));
this.transitionToRoute('events.view.tickets.access-codes');
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occured. Access code cannot be created.'));
.catch(e => {
console.error('Error while creating access code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred. Access code cannot be created.'));
});
}
}
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/events/view/tickets/access-codes/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ export default Controller.extend({
this.notify.success(this.l10n.t('Access code has been successfully updated.'));
this.transitionToRoute('events.view.tickets.access-codes');
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occured. Access code cannot be created.'));
.catch(e => {
console.error('Error while updating access code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred. Access code cannot be created.'));
});
}
}
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/events/view/tickets/discount-codes/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ export default Controller.extend({
this.notify.success(this.l10n.t('Discount code has been successfully created.'));
this.transitionToRoute('events.view.tickets.discount-codes');
})
.catch(() => {
this.notify.error(this.l10n.t('An unexpected error has occured. Discount code cannot be created.'));
.catch(e => {
console.error('Error while creating discount code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred. Discount code cannot be created.'));
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/events/view/tickets/discount-codes/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default Controller.extend({
this.notify.success(this.l10n.t('Discount code has been successfully updated.'));
this.transitionToRoute('events.view.tickets.discount-codes');
})
.catch(() => {
.catch(e => {
console.error('Error while updating discount code', e);
this.notify.error(this.l10n.t('An unexpected error has occurred. Discount code cannot be updated.'));
});
}
Expand Down