jfrog / bower-art-resolver

Apache License 2.0
15 stars 17 forks source link

retry not working for EINCOMPLETE error. #28

Open manoharnv opened 7 years ago

manoharnv commented 7 years ago

download.js is throwing error in case of incomplete download. However the error handler is not retrying the request because the error EINCOMPLETE is not added to the errorcodes list.

var errorCodes = [    'EADDRINFO',    'ETIMEDOUT',    'ECONNRESET',    'ESOCKETTIMEDOUT'];

.on('error', function (error) {            var timeout = operation._timeouts[0];           
 // Reject if error is not a network error            
if (**errorCodes.indexOf(error.code) === -1**) {              
  return deferred.reject(error);           
 }
jacobuk commented 7 years ago

I am also facing this issue. Could you please include this fix in the next release?

eyalbe4 commented 7 years ago

@jacobuk and @manoharnv, Thanks for reporting this. We'll look into this soon and let you know.

eyalbe4 commented 7 years ago

@manoharnv, thanks for the precise fix location in the code! @jacobuk and @manoharnv, We've just pushed this commit as @manoharnv suggested and published version 2.0.9. Please let us know if the new release resolve the issue.

jacobuk commented 7 years ago

Thanks for the quick response! Will try it out and update you next week.