Opened 7 months ago

Closed 7 months ago

#32261 closed New feature (fixed)

Log exceptions handled in Signal.send_robust()

Reported by: Adam Johnson Owned by: Ayush Bansal
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As pointed out by Haki Benita on Twitter, by default Signal.send_robust() doesn't have any log messages for exceptions raised in receivers. Since Django logs exceptions in other similar situations, such as missing template variables, I think it would be worth adding a logger.exception() call in the except clause of send_robust() . Users would then see such exceptions in their error handling tools, e.g. Sentry, and be able to figure out what action to take from there. Ultimately any *expected* exception should be caught with a try in the receiver function.

Change History (6)

comment:1 Changed 7 months ago by Simon Charette

Triage Stage: UnreviewedAccepted

comment:2 Changed 7 months ago by Ayush Bansal

Owner: changed from nobody to Ayush Bansal
Status: newassigned

I would like to work on this issue.
PS. i am new to this django. so any advice would be appreciated

comment:3 Changed 7 months ago by Ayush Bansal

Has patch: set

comment:4 Changed 7 months ago by Mariusz Felisiak

Patch needs improvement: set

comment:5 Changed 7 months ago by Mariusz Felisiak

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 Changed 7 months ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In b960e4e:

Fixed #32261 -- Added error logging to Signal.send_robust().

Note: See TracTickets for help on using tickets.
Back to Top