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

Add option to disable injecting context into error #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kschat
Copy link

@kschat kschat commented Jul 7, 2016

Adds the ability to disable the injection of the current context onto thrown errors.

The motivation behind this is to solve an issue I was having with logging errors when the current context contains an object with circular references. Furthermore, adding properties to error objects feels a little intrusive and there should be a way to disable it if desired.

@kschat
Copy link
Author

kschat commented Nov 9, 2016

bump

Is this project still being maintained?

@Qard
Copy link
Collaborator

Qard commented Nov 12, 2016

Not sure I really see much value to this, seems like your error logging should just be filtering properties better. Adding contextual properties onto error objects is very common: many ORM libraries do it, most routing frameworks do it too, even node core adds extra non-standard stuff onto errors.

@kschat
Copy link
Author

kschat commented Nov 12, 2016

This still allows adding contextual properties to error objects (it even leaves it on by default), it just gives the option to turn it off. We have logging filtering, but I'd prefer if we could remove the context in general.

@Jeff-Lewis
Copy link

@kschat We had similar issues logging odd 3rd party objects and errors. Here's a gist we used to help keep the objects and errors clean for logging.

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.

3 participants