requestify icon indicating copy to clipboard operation
requestify copied to clipboard

{ [Error: socket hang up] code: 'ECONNRESET' } what is this?

Open surajdalvi opened this issue 10 years ago • 6 comments

I use this module to call a server, but response takes so much time so I got { [Error: socket hang up] code: 'ECONNRESET' } this error . so what it is? How to solve it?

surajdalvi avatar Sep 11 '15 07:09 surajdalvi

HI Im also getting above Error any one has solution so far??

mpmadhuranga avatar Dec 14 '15 05:12 mpmadhuranga

Can you please show some code to be able to reproduce this?

angelxmoreno avatar Apr 02 '16 01:04 angelxmoreno

Same issue.

return async(function () { var body = await(Request.post(BASEURI + '/auth/fbLogin', { "facebookID":543717755820652, "birthday": "2000-11-14", "registerType": 1, "username": "JCharles", "email": "[email protected]", "gender": "Male" })); cl('\n'); cl(body); })(); (where cl() is an alias for console.log)

post: function (path, data) { return new Promise(function (resolve, reject) { var options = {method: "POST", body: data, dataType: 'json'} requestify.request(path, options).then(function (response) { var body = response.getBody(); resolve(body); }).catch(function (e) { cl('\n'); cl("POST", e); reject(e); }); }); },

Alex-Werner avatar Jul 20 '16 09:07 Alex-Werner

Anyone figured this out?

jmorrisIII avatar Nov 18 '16 15:11 jmorrisIII

@jmorrisIII Honestly, I didn't stuggle much with that and switched with the Request npm package.

Alex-Werner avatar Nov 22 '16 15:11 Alex-Werner

@Alex-Werner thanks for your response. I switched to Superagent and solved the problem.

jmorrisIII avatar Nov 23 '16 14:11 jmorrisIII