Skip to content

Commit d680900

Browse files
committed
feat: Added verbose logs and format chatwoot service
1 parent 78bd4fd commit d680900

File tree

2 files changed

+409
-27
lines changed

2 files changed

+409
-27
lines changed

src/whatsapp/controllers/instance.controller.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ export class InstanceController {
404404
const stateConn = await this.connectionState({ instanceName });
405405

406406
if (stateConn.state === 'close') {
407-
throw new BadRequestException('Instance already logged out');
407+
throw new BadRequestException(
408+
'The "' + instanceName + '" instance is not connected',
409+
);
408410
}
409411

410412
try {
@@ -427,10 +429,9 @@ export class InstanceController {
427429
const stateConn = await this.connectionState({ instanceName });
428430

429431
if (stateConn.state === 'open') {
430-
throw new BadRequestException([
431-
'Deletion failed',
432-
'The instance needs to be disconnected',
433-
]);
432+
throw new BadRequestException(
433+
'The "' + instanceName + '" instance needs to be disconnected',
434+
);
434435
}
435436
try {
436437
if (stateConn.state === 'connecting') {

0 commit comments

Comments
 (0)