new(whatsapp.gblib): Auto-create WhatsApp templates from articles in .docx.
This commit is contained in:
parent
faa5140450
commit
400ec2b706
1 changed files with 15 additions and 1 deletions
16
src/app.ts
16
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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue