You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In bull, when saving a failed job processing attempt, it stores the stack trace and the error message, it would be great to store any extended error attributes also.
So, if someone wants to use a custom error object, all they have to do is implement toJSON in their extended Error object. Needs some further thinking though; what if someone wants the message even if Error implements toJSON ? or is it just fine?
Using the property failedReason as both JSON and string is not something new with bull; progress does the same so it might be a good idea in order to have a unified behavior instead of introducing another property to the Job object.
I'm sure a lot of projects, including a couple of mine, use extended Error objects
A simple example would be
https://github.com/goldbergyoni/nodebestpractices/blob/master/sections/errorhandling/useonlythebuiltinerror.md#use-only-the-built-in-error-object
In bull, when saving a failed job processing attempt, it stores the stack trace and the error message, it would be great to store any extended error attributes also.
The text was updated successfully, but these errors were encountered: