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

ActiveJob discard_on reports to Honeybadger #634

Open
kylekeesling opened this issue Nov 7, 2024 · 2 comments
Open

ActiveJob discard_on reports to Honeybadger #634

kylekeesling opened this issue Nov 7, 2024 · 2 comments

Comments

@kylekeesling
Copy link
Contributor

kylekeesling commented Nov 7, 2024

I have a few Active Jobs (using solid_queue as the back-end) where I'm using discard_on and noticed that the error is being reported to Honeybadger. Is this the expected/desired behavior?

In my case, I'm using it to just silently throw the job away when a RequestForbiddenError happens (it's an external API call where the user's account may have been deactivated at some point), so I don't really need to be notified.

The Rails docs imply that this is to be used in events where the job is no longer relevant, which in my mind means that you'd also not care to be notified about it.

My preference would be for this not to be reported as an error, but I can also understand an argument the other way, where you'd rather be safe than sorry to report it.

Either way, I just wanted to confirm that this is how you intended it to work before I go a different route in solving the problem, which will likely just be a rescue block that returns nil if the error occurs.

@stympy
Copy link
Member

stympy commented Nov 7, 2024

I'm pretty sure there was no intended behavior regarding discard_on— I wasn't aware it existed until a couple of days ago ;) — so I'm open to changing how it works.

@kylekeesling
Copy link
Contributor Author

Great to hear, thank you!

If there's something I can do to help, please let me know. I'm not sure how good I am at digging into ActiveJob internals, but I am happy to be of any use.

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

No branches or pull requests

2 participants