mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #565] [FEATURE REQUEST] Custom worker error handling #1283
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#1283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @endigma on GitHub (Oct 25, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/565
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
When tasks fail, they are documented to return
error, these errors then get put in redis next to the retry. It would be nice if we could hook into this return process and execute custom "middleware" on returned errors (sentry, logging, etc).Describe the solution you'd like
A function like
func HandleErr(err error) errorthat is run as "middleware" when a worker returns an error.Describe alternatives you've considered
Of course you can just log all the errors manually before returning them, but this decentralizes management of these errors and would require dragging a sentry/log client through many functions.