From 400ec2b706414eca8d244a9713adc3aaa77f8fa7 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sat, 10 Aug 2024 12:25:21 -0300 Subject: [PATCH] new(whatsapp.gblib): Auto-create WhatsApp templates from articles in .docx. --- src/app.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index aeca5829..fd1c29b1 100644 --- a/src/app.ts +++ b/src/app.ts @@ -121,11 +121,25 @@ export class GBServer { }); process.on('unhandledRejection', (err, p) => { - GBLogEx.error(0,`GBREJECTION: ${GBUtil.toYAML(err)}`); + + let bypass = false; + let res = err['response']; + if (res) { + if (res?.body?.error?.messages?.startsWith('Failed to send activity: bot timed out')){ + bypass = true; + } + } + + if(!bypass){ + GBLogEx.error(0,`GBREJECTION: ${GBUtil.toYAML(err)}`); + } }); // Creates working directory. + + + process.env.PWD = process.cwd(); const workDir = Path.join(process.env.PWD, 'work'); if (!fs.existsSync(workDir)) {