Skip to content

[Storage] Confusing behavior accessing nonexistent Azure Queue Storage #14356

@shwars

Description

@shwars
  • Package Name: azure-storage-queue
  • Package Version: 12.1.3
  • Operating System: windows / linux
  • Python Version: 3.7.4

Describe the bug
When trying to access non-existent account of Azure queue storage, QueueClient is created w/out errors, and calling receive_messages() results in a long timeout (followed by an error).

To Reproduce:

Consider the following code:

from azure.storage.queue import QueueClient
conn = "<correctly formed connection string with invalid account name>"

print("Creating client")
queue_client = QueueClient.from_connection_string(conn, "thequeue")

print("Getting queue messages")
for x in queue_client.receive_messages():
    print(x)

This code prints both messages immediately, followed by a long (80 seconds) delay. Traceback of an error that follows is available here

The long timeout behavior is confusing, especially when you are debugging a program that has an endless loop over queue messages, and you are wondering, why it is not executing.

Expected behavior
One of the following options:

  1. Error about non-existing account name upon creation of QueueClient (I understand this might not be possible, because additional REST call would be required)
  2. Shorter timeout
  3. Some indication in the error message about possibility of non-existing account.

Metadata

Metadata

Labels

DocsService AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions