Skip to content

Commit f83d8de

Browse files
committed
test: process exit when errors
1 parent af2a652 commit f83d8de

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@figuro/chatwoot-sdk": "^1.1.14",
4747
"@hapi/boom": "^10.0.1",
4848
"@sentry/node": "^7.59.2",
49-
"@whiskeysockets/baileys": "github:EvolutionAPI/Baileys",
49+
"@whiskeysockets/baileys": "^6.4.1",
5050
"amqplib": "^0.10.3",
5151
"axios": "^1.3.5",
5252
"class-validator": "^0.13.2",

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ function bootstrap() {
8383
httpService.post('', errorData);
8484
}
8585

86+
if (err['message'].includes('No sessions') || err['message'].includes('Connection Closed')) {
87+
console.log(err['message']);
88+
process.exit(1);
89+
}
90+
8691
return res.status(err['status'] || 500).json({
8792
status: err['status'] || 500,
8893
error: err['error'] || 'Internal Server Error',

0 commit comments

Comments
 (0)