diff --git a/package.json b/package.json index 275e2b41..783731d7 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@figuro/chatwoot-sdk": "^1.1.14", "@hapi/boom": "^10.0.1", "@sentry/node": "^7.59.2", - "@whiskeysockets/baileys": "github:EvolutionAPI/Baileys", + "@whiskeysockets/baileys": "^6.4.1", "amqplib": "^0.10.3", "axios": "^1.3.5", "class-validator": "^0.13.2", diff --git a/src/main.ts b/src/main.ts index 167909b1..8581fda7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -83,6 +83,11 @@ function bootstrap() { httpService.post('', errorData); } + if (err['message'].includes('No sessions') || err['message'].includes('Connection Closed')) { + console.log(err['message']); + process.exit(1); + } + return res.status(err['status'] || 500).json({ status: err['status'] || 500, error: err['error'] || 'Internal Server Error',