Commit 11b9c8c18bf072509c1acc53389af713a8a59311
1 parent
b37a08a319
Exists in
master
exception saat parsing message dari partner
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
partner-komodo.js
... | ... | @@ -110,7 +110,7 @@ function topupRequest(task, pendingOnConnectError) { |
110 | 110 | } |
111 | 111 | |
112 | 112 | let result = parsePartnerMessage(body); |
113 | - processPartnerResponse(result); | |
113 | + processPartnerResponse(result, task); | |
114 | 114 | |
115 | 115 | }) |
116 | 116 | } |
... | ... | @@ -122,7 +122,7 @@ function topupAdvice(task) { |
122 | 122 | function processPartnerResponse(resObj, task) { |
123 | 123 | if (!resObj) { |
124 | 124 | |
125 | - if (task.requestId) { | |
125 | + if (task && task.requestId) { | |
126 | 126 | callbackReport(task.requestId, '40', 'Error parsing response from partner. Partner response: ' + body, {task: task}); |
127 | 127 | } |
128 | 128 | else { |
... | ... | @@ -153,6 +153,7 @@ function parsePartnerMessage(partner_message) { |
153 | 153 | |
154 | 154 | } |
155 | 155 | catch(e) { |
156 | + logger.verbose('Exception on parsing partner message: ' + partner_message); | |
156 | 157 | result = null; |
157 | 158 | } |
158 | 159 |