-
Notifications
You must be signed in to change notification settings - Fork 26
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
honeybadger.notify: error_message is ignored when an exception is provided #187
Comments
Hey @benjaoming — thanks for opening the issue! What you observed is by design... if you provide an exception to try:
launch_rocket(*args)
except Exception as e:
handle_failure()
honeybadger.notify(
exception=e,
context={
"retries": retries,
"args": str(args), # Add launch args as context instead
},
) |
@stympy understood, but it's a bit confusing that it will happily accept the argument and throw away the data. Not sure what's a good solution, certainly failing the call doesn't seem nice. But maybe automatically adding it to the context would help the misguided dev 😄 |
And thanks for the quick response 🙏 |
Yeah, I agree that's not a great experience... I like the idea of adding it to the context. |
I'm re-opening the issue to add the error_message to the context when both an |
Say I want to use a pattern like this:
...then what I get is a correct exception traceback. But the
error_message
argument isn't found.The text was updated successfully, but these errors were encountered: