Skip to content

fix: Catch and surface BaseException()#1108

Merged
mukund-ananthu merged 3 commits intomainfrom
be
Mar 6, 2024
Merged

fix: Catch and surface BaseException()#1108
mukund-ananthu merged 3 commits intomainfrom
be

Conversation

@mukund-ananthu
Copy link
Contributor

Currently, the behavior of the library is to catch Exception() when encountered in the user provided callback, surface it to the calling code and shut down the client.

However, for BaseException() encountered in the user provided callback, the BaseException() is not surfaced to the calling code and the client is not shut down.

Make the behavior of the client when BaseException() is encountered consistent with the behavior of the client when Exception() is encountered.

Fixes #1107 🦕

@mukund-ananthu mukund-ananthu requested a review from a team as a code owner March 5, 2024 15:40
@mukund-ananthu mukund-ananthu requested a review from a team March 5, 2024 15:40
@mukund-ananthu mukund-ananthu self-assigned this Mar 5, 2024
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: pubsub Issues related to the googleapis/python-pubsub API. labels Mar 5, 2024
Currently, the behavior of the library is to catch Exception() when encountered in the user provided callback, surface it to the calling code and shut down the client.

However, for BaseException() encountered in the user provided callback, the BaseException() is not surfaced to the calling code and the client is not shut down.

Make the behavior of the client when BaseException() is encountered consistent with the behavior of the client when Exception() is encountered.
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Mar 5, 2024
@mukund-ananthu mukund-ananthu enabled auto-merge (squash) March 6, 2024 00:58
@mukund-ananthu mukund-ananthu merged commit 07e427f into main Mar 6, 2024
@mukund-ananthu mukund-ananthu deleted the be branch March 6, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the googleapis/python-pubsub API. size: s Pull request size is small.

2 participants