feat: Added verbose logs and format chatwoot service

This commit is contained in:
Davidson Gomes
2023-07-14 11:56:42 -03:00
parent 78bd4fd7de
commit d680900f07
2 changed files with 409 additions and 27 deletions

View File

@@ -404,7 +404,9 @@ export class InstanceController {
const stateConn = await this.connectionState({ instanceName });
if (stateConn.state === 'close') {
throw new BadRequestException('Instance already logged out');
throw new BadRequestException(
'The "' + instanceName + '" instance is not connected',
);
}
try {
@@ -427,10 +429,9 @@ export class InstanceController {
const stateConn = await this.connectionState({ instanceName });
if (stateConn.state === 'open') {
throw new BadRequestException([
'Deletion failed',
'The instance needs to be disconnected',
]);
throw new BadRequestException(
'The "' + instanceName + '" instance needs to be disconnected',
);
}
try {
if (stateConn.state === 'connecting') {