Merge pull request #3659 from tgxworld/missing_error_messages_for_toggle
FIX: Missing error message when bookmark rate limit is hit.
This commit is contained in:
commit
0ee0818b20
|
@ -233,8 +233,8 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
||||||
}
|
}
|
||||||
if (post) {
|
if (post) {
|
||||||
return post.toggleBookmark().catch(function(error) {
|
return post.toggleBookmark().catch(function(error) {
|
||||||
if (error && error.responseText) {
|
if (error && error.jqXHR && error.jqXHR.responseText) {
|
||||||
bootbox.alert($.parseJSON(error.responseText).errors[0]);
|
bootbox.alert($.parseJSON(error.jqXHR.responseText).errors[0]);
|
||||||
} else {
|
} else {
|
||||||
bootbox.alert(I18n.t('generic_error'));
|
bootbox.alert(I18n.t('generic_error'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue