FIX: Better error message for when your bookmark rate limit is exceeded

This commit is contained in:
Robin Ward 2017-05-09 15:42:55 -04:00
parent ae15b10cf8
commit a1baf73956
1 changed files with 1 additions and 15 deletions

View File

@ -282,21 +282,7 @@ const Topic = RestModel.extend({
} }
return []; return [];
}).catch(error => { }).catch(popupAjaxError).finally(() => this.set('bookmarking', false));
let showGenericError = true;
if (error && error.responseText) {
try {
bootbox.alert($.parseJSON(error.responseText).errors);
showGenericError = false;
} catch(e) { }
}
if (showGenericError) {
bootbox.alert(I18n.t('generic_error'));
}
throw error;
}).finally(() => this.set('bookmarking', false));
}; };
const unbookmarkedPosts = []; const unbookmarkedPosts = [];