Error handling

merge-requests/1/merge
Bsian 2019-11-21 14:39:07 +00:00
parent 7316b62282
commit 3156fe58e9
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@ export default class Account extends Route {
res.status(200).json({ code: this.constants.codes.SUCCESS, message: acc });
} catch (error) {
this.handleError(error, res);
this.server.client.util.handleError(error);
}
});
@ -42,6 +43,7 @@ export default class Account extends Route {
}
} catch (error) {
this.handleError(error, res);
this.server.client.util.handleError(error);
}
});
@ -51,6 +53,7 @@ export default class Account extends Route {
res.status(200).json({ code: this.constants.codes.SUCCESS, message: data });
} catch (error) {
this.handleError(error, res);
this.server.client.util.handleError(error);
}
});
}

View File

@ -35,6 +35,7 @@ export default class Root extends Route {
res.status(200).json({ code: this.constants.codes.SUCCESS, message: response });
} catch (error) {
this.handleError(error, res);
this.server.client.util.handleError(error);
}
});
}