Skip to content

Commit

Permalink
Merge pull request #636 from praekeltfoundation/sigma-1155-CAPI-regis…
Browse files Browse the repository at this point in the history
…tration-USSD

adding logs for testing
  • Loading branch information
Buhle79 authored Jul 22, 2024
2 parents fe4978c + 5ecac9d commit 1899345
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 1899345

Please sign in to comment.