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

Error info #136

Closed
wants to merge 2 commits into from
Closed

Error info #136

wants to merge 2 commits into from

Conversation

scinos
Copy link
Contributor

@scinos scinos commented Sep 30, 2012

Propagate error information in 'failed' event

@tj
Copy link
Contributor

tj commented Oct 1, 2012

why not just pass the error object?

@scinos
Copy link
Contributor Author

scinos commented Oct 1, 2012

That was was my first solution, but err.message was evaluated to 'undefined' when the error was received by the handler.

My guess is that 'message' is not enumerable and ignored when the error is serialized using JSON.stringify() (events.js, line 90)

@tj
Copy link
Contributor

tj commented Oct 1, 2012

yeah they're non-enumerable but it still makes more sense to pass the error and do whatever with it later

@scinos
Copy link
Contributor Author

scinos commented Oct 1, 2012

Maybe I'm wrong, but that error needs to be passed from the runner to the client (i.e. where the job was created), and that system is implemented as a JSON message passed using redis. So there is no 'later', the function event.emit() will convert it to a JSON string before doing anything useful with the event.

If the error (and by extension, any argument emmited with an event) has non-enumerable properties, we need to find another way to pass it to the client.

@ragulka
Copy link

ragulka commented Feb 1, 2013

Form my point of view, it is crucial that we can somehow handle errors in the failed callbacks.

If a job fails, I want to be able to log it and perhaps send a notification. I could do that from inside the job processor, but I think it makes much more sense to handle this on queue or job level.

@bulkan
Copy link
Contributor

bulkan commented Jun 28, 2013

This is fixed in PR #175

@behrad
Copy link
Collaborator

behrad commented Jan 21, 2014

is fixed in #256

@behrad behrad closed this Jan 21, 2014
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.

5 participants