mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
test: process exit when errors
This commit is contained in:
parent
af2a652098
commit
f83d8de476
@ -46,7 +46,7 @@
|
|||||||
"@figuro/chatwoot-sdk": "^1.1.14",
|
"@figuro/chatwoot-sdk": "^1.1.14",
|
||||||
"@hapi/boom": "^10.0.1",
|
"@hapi/boom": "^10.0.1",
|
||||||
"@sentry/node": "^7.59.2",
|
"@sentry/node": "^7.59.2",
|
||||||
"@whiskeysockets/baileys": "github:EvolutionAPI/Baileys",
|
"@whiskeysockets/baileys": "^6.4.1",
|
||||||
"amqplib": "^0.10.3",
|
"amqplib": "^0.10.3",
|
||||||
"axios": "^1.3.5",
|
"axios": "^1.3.5",
|
||||||
"class-validator": "^0.13.2",
|
"class-validator": "^0.13.2",
|
||||||
|
@ -83,6 +83,11 @@ function bootstrap() {
|
|||||||
httpService.post('', errorData);
|
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({
|
return res.status(err['status'] || 500).json({
|
||||||
status: err['status'] || 500,
|
status: err['status'] || 500,
|
||||||
error: err['error'] || 'Internal Server Error',
|
error: err['error'] || 'Internal Server Error',
|
||||||
|
Loading…
Reference in New Issue
Block a user