new(whatsapp.gblib): New WhatsApp provider: Meta.
This commit is contained in:
parent
6059c60c06
commit
5f54859790
2 changed files with 8 additions and 12 deletions
|
@ -610,11 +610,9 @@ export class WhatsappDirectLine extends GBService {
|
|||
});
|
||||
watermark = response.obj.watermark;
|
||||
await this.printMessages(response.obj.activities, conversationId, from, fromName);
|
||||
} catch (err) {
|
||||
} catch (error) {
|
||||
GBLog.error(
|
||||
`Error calling printMessages on Whatsapp channel ${err.data === undefined ?
|
||||
err : err.data} ${err.errObj ? err.errObj.message : ''
|
||||
}`
|
||||
`Error calling printMessages on Whatsapp channel ${JSON.stringify(error)}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
14
src/app.ts
14
src/app.ts
|
@ -111,15 +111,13 @@ export class GBServer {
|
|||
});
|
||||
|
||||
process.on('uncaughtException', (err, p) => {
|
||||
if (err !== null) {
|
||||
err = err['e'] ? err['e'] : err;
|
||||
const msg = `${err['code'] ? err['code'] : ''} ${err?.['response']?.['data'] ? err?.['response']?.['data'] : ''} ${err.message ? err.message : ''} ${err['description'] ? err['description'] : ''}`
|
||||
GBLog.error(`UNCAUGHT_EXCEPTION: ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''} ${msg}`);
|
||||
} else {
|
||||
GBLog.error('UNCAUGHT_EXCEPTION: Unknown error (err is null)');
|
||||
}
|
||||
GBLog.error(`UNCAUGHT_EXCEPTION: ${JSON.stringify(err).}`);
|
||||
});
|
||||
// Creates working directory.
|
||||
|
||||
process.on('unhandledRejection', (err, p) => {
|
||||
GBLog.error(`UNHANDLED_REJECTION: ${JSON.stringify(err).}`);
|
||||
});
|
||||
// Creates working directory.
|
||||
|
||||
process.env.PWD = process.cwd();
|
||||
const workDir = Path.join(process.env.PWD, 'work');
|
||||
|
|
Loading…
Add table
Reference in a new issue