Skip to content

Commit

Permalink
Fixed that the exception param typing should be Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
hawang-wish authored Sep 3, 2024
1 parent bb84f2b commit 881c4d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion taskiq/abc/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def on_send_error(
self,
message: "TaskiqMessage",
broker_message: "BrokerMessage",
exception: BaseException,
exception: Exception,
) -> "Union[Union[bool, None], Coroutine[Any, Any, Union[bool, None]]]":
"""
This function is called when exception is raised while sending a message.
Expand All @@ -140,6 +140,9 @@ def on_send_error(
Any exceptions occurred by broker's formatter will not trigger this.
SystemExit, KeyboardInterrupt as well as other BaseExceptions will not
be caught here as it would be essentially meaningless to catch them.
:param message: the sending TaskiqMessage (not BrokerMessage)
:param broker_message: the sending BrokerMessage (not TaskiqMessage)
:param exception: exception, not yet wrapped with SendTaskError
Expand Down

0 comments on commit 881c4d6

Please sign in to comment.