Commit 7bf367fb66ba05b41b0cfe0750993cdb7280b65e
1 parent
cb49ed9c41
Exists in
master
debug isCheckStatus
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
partner-simplepay.js
... | ... | @@ -206,7 +206,7 @@ function getPartnerRCFromDiagMessage(diag) { |
206 | 206 | return matches[1]; |
207 | 207 | } |
208 | 208 | |
209 | -function _hitTopup(task, pendingOnErrorConnect) { | |
209 | +function _hitTopup(task, isCheckStatus) { | |
210 | 210 | |
211 | 211 | const dt = moment().format('YYYY-MM-DD HH:mm:ss'); |
212 | 212 | const username = config.h2h_out.username || config.h2h_out.userid; |
... | ... | @@ -232,11 +232,11 @@ function _hitTopup(task, pendingOnErrorConnect) { |
232 | 232 | if (error) { |
233 | 233 | let rc = '68'; |
234 | 234 | |
235 | - if (!pendingOnErrorConnect && (error.syscall == 'connect')) { | |
235 | + if (!isCheckStatus && (error.syscall == 'connect')) { | |
236 | 236 | rc = '91'; |
237 | 237 | } |
238 | 238 | |
239 | - logger.warn('Error requesting to partner', {task: task, rc: rc, error: error}); | |
239 | + logger.warn('Error requesting to partner', {task: task, rc: rc, error: error, isCheckStatus: isCheckStatus}); | |
240 | 240 | callbackReport(task.requestId, rc, 'Error requesting to partner. ' + error, {task: task}); |
241 | 241 | return; |
242 | 242 | } |
... | ... | @@ -244,7 +244,7 @@ function _hitTopup(task, pendingOnErrorConnect) { |
244 | 244 | if (response.statusCode != 200) { |
245 | 245 | let rc = '68'; |
246 | 246 | |
247 | - logger.warn('HTTP status code is not 200', {task: task, http_status_code: response.statusCode}); | |
247 | + logger.warn('HTTP status code is not 200', {task: task, http_status_code: response.statusCode, isCheckStatus: isCheckStatus}); | |
248 | 248 | callbackReport(task.requestId, rc, 'HTTP status code ' + response.statusCode, {task: task}); |
249 | 249 | return; |
250 | 250 | } |