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

File diff suppressed because it is too large Load Diff