From 59af6957aed0f499315acc18ae0a9c67b5fa0948 Mon Sep 17 00:00:00 2001 From: buhle79 Date: Mon, 22 Jul 2024 08:24:56 +0200 Subject: [PATCH] adding logs for testing --- go-app-ussd_clinic_rapidpro.js | 2 ++ src/ussd_clinic_rapidpro.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/go-app-ussd_clinic_rapidpro.js b/go-app-ussd_clinic_rapidpro.js index 486c5801..ca4ddfce 100644 --- a/go-app-ussd_clinic_rapidpro.js +++ b/go-app-ussd_clinic_rapidpro.js @@ -1279,6 +1279,7 @@ go.app = function() { return self.states.create("state_accept_popi"); }).catch(function(e) { // Go to error state after 3 failed HTTP requests + console.log("Template Error: ", e.message); opts.http_error_count = _.get(opts, "http_error_count", 0) + 1; if (opts.http_error_count === 3) { self.im.log.error(e.message); @@ -1432,6 +1433,7 @@ go.app = function() { return self.states.create("state_trigger_rapidpro_flow"); }).catch(function(e) { // Go to error state after 3 failed HTTP requests + console.log("Status Error: ", e.message); opts.http_error_count = _.get(opts, "http_error_count", 0) + 1; if (opts.http_error_count === 3) { self.im.log.error(e.message); diff --git a/src/ussd_clinic_rapidpro.js b/src/ussd_clinic_rapidpro.js index bfb4dc1b..a6797f38 100644 --- a/src/ussd_clinic_rapidpro.js +++ b/src/ussd_clinic_rapidpro.js @@ -1018,6 +1018,7 @@ go.app = function() { return self.states.create("state_accept_popi"); }).catch(function(e) { // Go to error state after 3 failed HTTP requests + console.log("Template Error: ", e.message); opts.http_error_count = _.get(opts, "http_error_count", 0) + 1; if (opts.http_error_count === 3) { self.im.log.error(e.message); @@ -1171,6 +1172,7 @@ go.app = function() { return self.states.create("state_trigger_rapidpro_flow"); }).catch(function(e) { // Go to error state after 3 failed HTTP requests + console.log("Status Error: ", e.message); opts.http_error_count = _.get(opts, "http_error_count", 0) + 1; if (opts.http_error_count === 3) { self.im.log.error(e.message);