Opened 3 years ago

Closed 3 years 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 by Simon Charette, 3 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Ayush Bansal, 3 years ago

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:4 by Mariusz Felisiak, 3 years ago

Patch needs improvement: set

comment:5 by Mariusz Felisiak, 3 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

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