Closed rgulewich closed 12 years ago
With these commits, when the tasks' callback is called with a generic Error
instance, (this also includes RangeError
, ReferenceError
, ... in general, anything which is not a restify.Error
), it will now pass Error's name
and message
properties to the job results like:
{
"name": "Error",
"message": "Fail task error"
}
I've also tried to pass stack track information to these errors, but it's useless, since we're running code sandboxed using VM API, and the stacks always point to WorkflowTaskRunner
.
Let me know if the solution is good enough or we should try to go further adding some extra information.
Tried it out this morning, and it worked great. Thanks!
If a task body calls the task callback with a regular error, like so:
the error reported by the workflow is blank:
If the callback is called with a restify error, the error has useful information: