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

Forward endpoint errors to httpsRequest #185

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

felicienfrancois
Copy link
Contributor

Needed to be able to handles thoose errors gracefully because endpoint is not exposed.

@nwgh
Copy link
Collaborator

nwgh commented Apr 22, 2016

Hrm, so for these, I think I would rather see some logging happen, as well, similar to how we do other errors that we forward on through other objects:

var self = this;
whatever.on('error', function (error) {
  self._log.error('Whatever error: ' + e.toString());
  forwardObject.emit('error', error);
}

Where whatever is the object you're catching errors from, and forwardObject is whatever you're calling emit on in your forwarder (sometimes self, sometimes httpsRequest in your patch).

That way we have symmetry in how we handle errors.

@felicienfrancois
Copy link
Contributor Author

@nwgh Ok, I just comitted the fix

@felicienfrancois
Copy link
Contributor Author

just a friendly bump :)

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