forked from engineering/cloudservices
Error handling
parent
7316b62282
commit
3156fe58e9
|
@ -27,6 +27,7 @@ export default class Account extends Route {
|
||||||
res.status(200).json({ code: this.constants.codes.SUCCESS, message: acc });
|
res.status(200).json({ code: this.constants.codes.SUCCESS, message: acc });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.handleError(error, res);
|
this.handleError(error, res);
|
||||||
|
this.server.client.util.handleError(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ export default class Account extends Route {
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.handleError(error, res);
|
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 });
|
res.status(200).json({ code: this.constants.codes.SUCCESS, message: data });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.handleError(error, res);
|
this.handleError(error, res);
|
||||||
|
this.server.client.util.handleError(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ export default class Root extends Route {
|
||||||
res.status(200).json({ code: this.constants.codes.SUCCESS, message: response });
|
res.status(200).json({ code: this.constants.codes.SUCCESS, message: response });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.handleError(error, res);
|
this.handleError(error, res);
|
||||||
|
this.server.client.util.handleError(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue