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

statsd.event should raise something more specific than Exception #725

Closed
tylertrussell opened this issue Jun 27, 2022 · 3 comments
Closed
Labels
kind/feature-request Feature request related issue
Milestone

Comments

@tylertrussell
Copy link

tylertrussell commented Jun 27, 2022

Is your feature request related to a problem? Please describe.
The statsd.event function will raise Exception in the event the payload is invalid (i.e. too big). This prevents users of the library from catching a specific exception, and could lead to other types of errors (e.g. TypeError) being "swallowed" when they should be allowed to propagate.

Describe the solution you'd like
Instead of Exception, the library should raise a ValueError (or some other more-specific Exception subclass).

Describe alternatives you've considered
Users of the library could catch an Exception and then try to compare the error message, which is not great.

Updating to remove stale tag; this is still reproducible.

@github-actions
Copy link

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.

@github-actions github-actions bot added the stale Stale - Bot reminder label Jul 28, 2022
@tylertrussell
Copy link
Author

I confirm that I can still reproduce this issue in the latest version of the project.

There is an open PR #730 that addresses this issue, it would be excellent to have that reviewed by the relevant parties at some point soon.

@sgnn7 sgnn7 added this to the 0.45.0 milestone Jul 29, 2022
@sgnn7 sgnn7 removed the stale Stale - Bot reminder label Jul 29, 2022
@sgnn7
Copy link
Contributor

sgnn7 commented Jul 29, 2022

@tylertrussell The linked PR has been merged so it should be out with the next release of this library (probably 0.45.x). I'll mark this issue as closed but feel free to reopen if needed.

@sgnn7 sgnn7 closed this as completed Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request Feature request related issue
Projects
None yet
Development

No branches or pull requests

2 participants