-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
If the subscription pull returns 0 messages in the enter method in the AutoAck class then on exit the acknowledge call raises an exception on the HTTP call: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/pubsub-0.22.0/pubsub/google/cloud/pubsub/subscription.py#L512
Currently the way a deal with this is to wrap the context manager in try/except or override exit to check for an empty list. The former is messy and the latter can just be fixed at source.
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.