Skip to content

Handle CancelledError in all uses of Task.exception() #1026

@shsms

Description

@shsms

What's needed?

Task.exception() returns caught exceptions as values, unless the caught exception is a CancelledError, in which case, it raises the CancelledError as well.

Our uses of Task.exception() might not be accounting for this behaviour and might need special handling if cancelling the parent task is not the right thing to do for any particular case.

Proposed solution

No response

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

priority:highAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to users

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions