1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00

catch JS errors

This commit is contained in:
Harvey Kandola 2017-03-10 11:16:31 +00:00
parent 079e53ff0d
commit ed431e9895
2 changed files with 7 additions and 0 deletions

View file

@ -211,6 +211,9 @@ export default Ember.Service.extend({
getMeta(documentId) {
return this.get('ajax').request(`documents/${documentId}/meta`, {
method: "GET"
}).then((response) => {
return response;
}).catch(() => {
});
},
@ -265,6 +268,7 @@ export default Ember.Service.extend({
}).then((response) => {
let data = this.get('store').normalize('page-meta', response);
return this.get('store').push(data);
}).catch(() => {
});
},

View file

@ -67,6 +67,9 @@ export default BaseService.extend({
}
return pages;
}).catch((/*error*/) => {
// we ignore any error to cater for anon users who don't
// have permissions to perform refresh
});
},