From 56d20726bbf747a53c47ab44d307b8e503c6471d Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Mon, 22 Aug 2016 15:51:10 +0700 Subject: [PATCH] gagal jika ECONNREFUSED atau EHOSTUNREACH --- xmlout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlout.js b/xmlout.js index a9bd42e..abecc22 100644 --- a/xmlout.js +++ b/xmlout.js @@ -94,7 +94,7 @@ function _topupRequest(task) { client.methodCall(methodName, [ params ], function (error, value) { // Results of the method response - if (error) { + if (error && (error.code == 'ECONNREFUSED' || error.code == 'EHOSTUNREACH')) { logger.warn('XMLRPC Client Error', {requestId: task['requestId'], errorMessage: error}); callbackReport(task['requestId'], '91', 'Gangguan koneksi ke suplier: ' + error); -- 1.9.0