Skip to content

connect errors fixes#10

Open
titulus wants to merge 4 commits into
saidimu:masterfrom
titulus:master
Open

connect errors fixes#10
titulus wants to merge 4 commits into
saidimu:masterfrom
titulus:master

Conversation

@titulus
Copy link
Copy Markdown

@titulus titulus commented Apr 5, 2016

way to handle errors in requests

for #9 and #11 issues

Based on issue

titulus added 4 commits April 5, 2016 13:59
right way to handle errors in requests

Based on [issue](request/request#636)
make reqest error handler to look like response error handler
wrap vulnerable `JSON.parse` into `try {} catch {}` construction

To handle `SyntaxError` exceprions instead of throwing it
@titulus titulus changed the title fix Error: connect ETIMEDOUT error connect errors fixes Apr 5, 2016
@titulus titulus mentioned this pull request Apr 5, 2016
@dsportes
Copy link
Copy Markdown

Could you please insert follwing lines in index.js
near line 17 : this.timeout = config.timeout || 5000;
near line 33 : timeout: this.timeout,
near line 70 : req.on('error', function (err) { cb(err) });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants