Commit e1cd1755a67945254342c15d45849bc92d5e6fab
1 parent
5ffcec4a42
Exists in
master
and in
1 other branch
Skip retry callback on http status exists
Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff
lib/core-callback/sender.js
... | ... | @@ -155,6 +155,14 @@ const sender = async (data, xid, retry) => { |
155 | 155 | responseBody: e.response && e.response.data, |
156 | 156 | }); |
157 | 157 | |
158 | + if (e.response && e.response.status) { | |
159 | + logger.verbose(`${MODULE_NAME} 10AE785C: Skip retry on http status presence`, { | |
160 | + xid, | |
161 | + httpStatus: e.response && e.response.status, | |
162 | + }); | |
163 | + return; | |
164 | + } | |
165 | + | |
158 | 166 | if ((retry || 0) < MAX_RETRY) { |
159 | 167 | await sleep(SLEEP_BEFORE_RETRY_MS); |
160 | 168 | logger.verbose(`${MODULE_NAME} D8958695: Going to retry sending CORE-CALLBACK TO PARTNER`, { |