new(whatsapp.gblib): Auto-create WhatsApp templates from articles in .docx.

This commit is contained in:
Rodrigo Rodriguez 2024-08-10 12:25:21 -03:00
parent faa5140450
commit 400ec2b706

View file

@ -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)) {