Skip to content

Commit

Permalink
chore: Reduce error to warning for unverified user order (#5191)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal authored Sep 29, 2020
1 parent 46367e9 commit 7ee3adf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ export default class IndexController extends Controller {
this.notify.success(this.l10n.t(`Order details saved. Please fill further details within ${this.settings.orderExpiryTime} minutes.`));
this.transitionToRoute('orders.new', order.data.attributes.identifier);
} catch (e) {
console.error('Error while saving order', e);
if (e.response?.errors[0]?.source?.code === 'unverified-user') {
console.warn('Unverified user placing order', e.response);
} else {
console.error('Error while saving order', e);
}
this.notify.error(this.l10n.t(e.response.errors[0].detail));
} finally {
this.set('isLoading', false);
Expand Down

0 comments on commit 7ee3adf

Please sign in to comment.