client/posts: fix handling sidebar errors
This commit is contained in:
parent
1a8ff11522
commit
c2606a2555
1 changed files with 2 additions and 4 deletions
|
@ -137,9 +137,7 @@ class PostReadonlySidebarControl {
|
|||
requestPromise()
|
||||
.then(
|
||||
response => { return api.get('/post/' + this._post.id) },
|
||||
response => {
|
||||
return Promise.reject(response.description);
|
||||
})
|
||||
response => { return Promise.reject(response); })
|
||||
.then(
|
||||
response => {
|
||||
this._post = response;
|
||||
|
@ -147,7 +145,7 @@ class PostReadonlySidebarControl {
|
|||
},
|
||||
response => {
|
||||
reject();
|
||||
events.notify(events.Error, errorMessage);
|
||||
window.alert(response.description);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue