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
14
src/app.ts
14
src/app.ts
|
@ -121,11 +121,25 @@ export class GBServer {
|
||||||
});
|
});
|
||||||
|
|
||||||
process.on('unhandledRejection', (err, p) => {
|
process.on('unhandledRejection', (err, p) => {
|
||||||
|
|
||||||
|
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)}`);
|
GBLogEx.error(0,`GBREJECTION: ${GBUtil.toYAML(err)}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Creates working directory.
|
// Creates working directory.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
process.env.PWD = process.cwd();
|
process.env.PWD = process.cwd();
|
||||||
const workDir = Path.join(process.env.PWD, 'work');
|
const workDir = Path.join(process.env.PWD, 'work');
|
||||||
if (!fs.existsSync(workDir)) {
|
if (!fs.existsSync(workDir)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue