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()
|
requestPromise()
|
||||||
.then(
|
.then(
|
||||||
response => { return api.get('/post/' + this._post.id) },
|
response => { return api.get('/post/' + this._post.id) },
|
||||||
response => {
|
response => { return Promise.reject(response); })
|
||||||
return Promise.reject(response.description);
|
|
||||||
})
|
|
||||||
.then(
|
.then(
|
||||||
response => {
|
response => {
|
||||||
this._post = response;
|
this._post = response;
|
||||||
|
@ -147,7 +145,7 @@ class PostReadonlySidebarControl {
|
||||||
},
|
},
|
||||||
response => {
|
response => {
|
||||||
reject();
|
reject();
|
||||||
events.notify(events.Error, errorMessage);
|
window.alert(response.description);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue