-
Notifications
You must be signed in to change notification settings - Fork 61
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
VError.info doesn't return custom properties on non-VError cause children #79
Comments
If I'm understanding right, that's the way it's intended. This bit in the README explains why we did it this way:
Sorry if I'm misunderstanding! |
This part of the documentation makes it sound like it should surface these custom properties. |
Also what about other libraries that I have no control over? |
When it says "properties from causes", it's referring to the same first-class informational properties that were provided in the VError constructor on those causes. Right now, you'd have to wrap errors from other libraries if you wanted to preserve this information. It's possible there's a better approach here? But the rest of the text explains our constraints on the problem and why it seemed fraught to just copy all the properties that we find. |
Okay, so I wrap other errors in VError to get those moved up. Got it. Makes sense |
I have an error class that adds custom properties to itself:
I have a logger method thats supposed to grab all the keys and scrub them from the error chain:
But when I pass an instance of the first error as the cause to VError, the
VError.info
method doesn't enumerate the keys for the ValidationError. Is this by design?The text was updated successfully, but these errors were encountered: