diff --git a/partner-trugee.js b/partner-trugee.js index fbc3fa9..13b5f6b 100644 --- a/partner-trugee.js +++ b/partner-trugee.js @@ -90,10 +90,17 @@ function topupRequest(task, retry) { function directResponseHandler(body, request_id) { logger.info('Got direct response'); + xml2js(body, function (err, result) { if (err) { - logger.warn('Error parsing xml', {err: err, body: body}); - callbackReport(request_id, '40', 'Error parsing xml. ' + err); + + if (body == 'Error: MAINTENANCE SYSTEM') { + callbackReport(request_id, '91', body); + } else { + logger.warn('Error parsing xml', {err: err, body: body}); + callbackReport(request_id, '40', 'Error parsing xml. ' + err); + } + return; }