server: handle some unhandled promise rejections

Unhandled Promise rejections are strictly prohibited and will
lead to NodeJS process termination in the future Node release.

This change also fixes some logics.
This commit is contained in:
Jesse Chan
2020-09-20 00:34:02 +08:00
parent 445c373c8f
commit cdbe980ac7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ export default (req, res) => {
});
if (serviceInstances.clientGatewayService.hasError) {
serviceInstances.clientGatewayService.testGateway();
serviceInstances.clientGatewayService.testGateway().catch(console.error);
}
// TODO: Handle empty or sub-optimal history states.