Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing of rejection value on failed get() #12

Open
anodynos opened this issue Jan 30, 2014 · 3 comments
Open

Printing of rejection value on failed get() #12

anodynos opened this issue Jan 30, 2014 · 3 comments

Comments

@anodynos
Copy link

Hi,

I am using v0.1.16 and when executing the simplest require('requestify').get('https://localhost') (where https is NOT configured on my box) I get an unwanted printout of:

{ [Error: connect ECONNREFUSED]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect' }

It turns out it is the rejection error being printed :

require('requestify').get('https://localhost').then(function(resp) {
    return console.log(resp);
  }, function(rej) {
    return console.log("rej = ", rej);
  });

gives

{ [Error: connect ECONNREFUSED]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect' }
rej =  { [Error: connect ECONNREFUSED]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect' }
@ranm8
Copy link
Owner

ranm8 commented Feb 10, 2014

Thanks for the input, just out of curiosity, what would you expect to get in return in such case?

@anodynos
Copy link
Author

Just the rejection & the reason (i.e error), without printing

@ashabhatt
Copy link

me too having same issue... please let me know the solution for this.

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

No branches or pull requests

3 participants