Skip to content

Commit 0de77a4

Browse files
Merge pull request #4209 from fossasia/development
2 parents b85fa50 + 99b652a commit 0de77a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1537
-1353
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = {
6262
],
6363
'max-len': 'off',
6464
'no-console': ["error", { allow: ["warn", "error"] }],
65-
'prefer-template': 'error',
65+
'prefer-template': 'off',
6666
'camelcase': 'off',
6767
'new-cap': 'off',
6868
'eqeqeq': ['error', 'smart'],

app/components/account/danger-zone.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export default Component.extend({
3737
id: 'account_Delete'
3838
});
3939
})
40-
.catch(() => {
40+
.catch(e => {
41+
console.error('Error while deleting account', e);
4142
this.notify.error(this.l10n.t('An unexpected error has occurred.'), {
4243
id: 'account_del_error'
4344
});

app/components/account/email-preferences-section.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export default Component.extend({
99
id: 'email_notif'
1010
});
1111
})
12-
.catch(() => {
12+
.catch(e => {
13+
console.error('Error while updating email notifications.', e);
1314
emailPreference.rollbackAttributes();
1415
this.notify.error(this.l10n.t('An unexpected error occurred.'), {
1516
id: 'email_error'

app/components/events/view/export/api-response.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export default Component.extend({
3838
json = JSON.stringify(json, null, 2);
3939
this.set('json', htmlSafe(syntaxHighlight(json)));
4040
})
41-
.catch(() => {
41+
.catch(e => {
42+
console.error('Error while fetching export JSON from server', e);
4243
this.notify.error(this.l10n.t('Could not fetch from the server'), {
4344
id: 'server_fetch_error'
4445
});

app/components/events/view/export/download-common.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ export default Component.extend({
3939
id: 'task_progress'
4040
});
4141
} else {
42+
console.error('Event exporting task failed', exportJobStatus);
4243
this.set('eventExportStatus', exportJobStatus.state);
4344
this.notify.error(this.l10n.t('Task failed.'), {
4445
id: 'task_fail'
4546
});
4647
}
4748
})
48-
.catch(() => {
49+
.catch(e => {
50+
console.error('Error while exporting event', e);
4951
this.set('eventExportStatus', 'FAILURE');
5052
this.notify.error(this.l10n.t('Task failed.'), {
5153
id: 'task_failure'
@@ -64,7 +66,8 @@ export default Component.extend({
6466
.then(exportJobInfo => {
6567
this.requestLoop(exportJobInfo);
6668
})
67-
.catch(() => {
69+
.catch(e => {
70+
console.error('Error while starting exporting job', e);
6871
this.set('isLoading', false);
6972
this.notify.error(this.l10n.t('Unexpected error occurred.'), {
7073
id: 'unexpected_down_error'

app/components/events/view/export/download-zip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default class extends Component {
1616
id: 'export_succ'
1717
});
1818
} catch (e) {
19-
console.error(e);
19+
console.error('Error while downloading event zip', e);
2020
this.notify.error(this.l10n.t(e), {
2121
id: 'err_down'
2222
});

app/components/events/view/overview/manage-roles.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export default Component.extend({
3232
id: 'man_role'
3333
});
3434
})
35-
.catch(() => {
35+
.catch(e => {
36+
console.error('Error while updating role invite', e);
3637
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'), {
3738
id: 'man_role_err'
3839
});
@@ -50,7 +51,8 @@ export default Component.extend({
5051
});
5152
this.get('data.roleInvites').removeObject(invite);
5253
})
53-
.catch(() => {
54+
.catch(e => {
55+
console.error('Error while deleting role invite', e);
5456
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'), {
5557
id: 'err_man_role'
5658
});

app/components/forms/admin/settings/system/mail-settings/test-email-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default Component.extend(FormMixin, {
4040
});
4141
})
4242
.catch(e => {
43-
console.warn(e);
43+
console.error('Error while sending test email', e);
4444
this.notify.error(this.l10n.t('An unexpected error has occurred'), {
4545
id: 'test_mail_err'
4646
});

app/components/forms/admin/settings/ticket-fees-form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export default Component.extend({
4040
id: 'fee_delete_succ'
4141
});
4242
})
43-
.catch(() => {
43+
.catch(e => {
44+
console.error('Error while deleting ticket', e);
4445
this.notify.error(this.l10n.t('Oops something went wrong. Please try again'), {
4546
id: 'fee_err'
4647
});

app/components/forms/login-form.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ export default class extends Component.extend(FormMixin) {
6161
}
6262
} catch (e) {
6363
if (e.json && e.json.error) {
64+
console.warn('Error while authentication', e);
6465
this.set('errorMessage', this.l10n.tVar(e.json.error));
6566
} else {
67+
console.error('Error while authentication', e);
6668
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
6769
}
6870
}
@@ -89,6 +91,7 @@ export default class extends Component.extend(FormMixin) {
8991
id: 'error_server_msg'
9092
});
9193
} else {
94+
console.error('Error while facebook authentication', e);
9295
this.notify.error(this.l10n.t('An unexpected error has occurred'), {
9396
id: 'unexpect_error'
9497
});

0 commit comments

Comments
 (0)