You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
The RestJS client doesn't return certain errors. For example, socket hang ups [ECONNRESET].
Check out the file restjs/tools/rest.js
In the Request.prototype.request, there's an event req.on('error', finish);. In the finish function, it never actually calls the callback if there is an error. For this case, isDone was false and err was a string.
functionfinish(err,res){if(isDone)return;//This would only happen if an error occurs AFTER the res has ended...doubtful that would ever happen.if(err){callbackArgs[0]=err;//If there's an error and no res, collect it and keep waiting until the 'end' event}else{isDone=true;callbackArgs[1]=res;if(!callbackArgs[0]&&middleware.length){//If there isn't already an error and there is middleware, run themasync.eachSeries(middleware,function(middlewareItem,fn){middlewareItem(res,fn);},function(err){if(err)callbackArgs[0]=err;callback.apply(null,callbackArgs);//Pass both the err and res to the callback, because often times the body will be just fine despite errors});}else{callback.apply(null,callbackArgs);//Pass both the err and res to the callback, because often times the body will be just fine despite errors}}}
The text was updated successfully, but these errors were encountered:
The RestJS client doesn't return certain errors. For example, socket hang ups [ECONNRESET].
Check out the file
restjs/tools/rest.js
In the Request.prototype.request, there's an event
req.on('error', finish);
. In the finish function, it never actually calls the callback if there is an error. For this case, isDone was false and err was a string.The text was updated successfully, but these errors were encountered: