Commit 2a434ffa90fb675f363eee964a4340bf91af8dba
1 parent
6cf2c9b2b4
Exists in
master
penananganan MAINTENANCE
Showing 1 changed file with 9 additions and 2 deletions Side-by-side Diff
partner-trugee.js
... | ... | @@ -90,10 +90,17 @@ function topupRequest(task, retry) { |
90 | 90 | |
91 | 91 | function directResponseHandler(body, request_id) { |
92 | 92 | logger.info('Got direct response'); |
93 | + | |
93 | 94 | xml2js(body, function (err, result) { |
94 | 95 | if (err) { |
95 | - logger.warn('Error parsing xml', {err: err, body: body}); | |
96 | - callbackReport(request_id, '40', 'Error parsing xml. ' + err); | |
96 | + | |
97 | + if (body == 'Error: MAINTENANCE SYSTEM') { | |
98 | + callbackReport(request_id, '91', body); | |
99 | + } else { | |
100 | + logger.warn('Error parsing xml', {err: err, body: body}); | |
101 | + callbackReport(request_id, '40', 'Error parsing xml. ' + err); | |
102 | + } | |
103 | + | |
97 | 104 | return; |
98 | 105 | } |
99 | 106 |