fix(whatsapp.gblib): Fixed check status.
This commit is contained in:
parent
8028c821cb
commit
8aff53ef86
1 changed files with 3 additions and 3 deletions
|
@ -531,7 +531,7 @@ export class GBMinService {
|
||||||
try {
|
try {
|
||||||
// Performs the checking of WhatsApp API if enabled for this instance.
|
// Performs the checking of WhatsApp API if enabled for this instance.
|
||||||
|
|
||||||
if (min.whatsAppDirectLine != undefined && instance.whatsappServiceKey !== null) {
|
if (min.whatsAppDirectLine && instance.whatsappServiceKey) {
|
||||||
if (!(await min.whatsAppDirectLine.check(min))) {
|
if (!(await min.whatsAppDirectLine.check(min))) {
|
||||||
const error = `WhatsApp API lost connection for: ${min.botId}.`;
|
const error = `WhatsApp API lost connection for: ${min.botId}.`;
|
||||||
GBLog.error(error);
|
GBLog.error(error);
|
||||||
|
@ -547,8 +547,8 @@ export class GBMinService {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// GB is not OK, 500 and detail the information on response content.
|
// GB is not OK, 500 and detail the information on response content.
|
||||||
|
|
||||||
GBLog.error(error);
|
GBLogEx.error(min, error);
|
||||||
res.status(500).send(error.toString());
|
res.status(500).send('Service with erros. Please, check service log.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue