Skip to content

Commit

Permalink
adding logs for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Buhle79 committed Jul 22, 2024
1 parent a0c26f7 commit 59af695
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go-app-ussd_clinic_rapidpro.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/ussd_clinic_rapidpro.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 59af695

Please sign in to comment.