You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.
Describe the bug
In Gateway Mode, certain queries or ReadItemAsync calls to Azure Cosmos DB return empty results or fail to retrieve documents, even though the documents exist in the database. The issue occurs when resource IDs or query parameters contain special characters (e.g., + | < > $ \ /). The same operations work correctly in Direct Mode. After switching back to Direct Mode, all queries return the correct results. This issue prevents consistent use of Gateway Mode.
To Reproduce
Create a document in Azure Cosmos DB with an ID containing special characters, such as ">test" or "%3Etest".
Attempt to retrieve the document using:
var document = await _cosmosContainer.ReadItemAsync<TDocument>(
id: id,
partitionKey: new PartitionKey(id),
cancellationToken: cancellationToken);
Perform the same operation in both Direct Mode and Gateway Mode.
Expected behavior
Direct Mode: The document should be successfully retrieved.
Gateway Mode: The document should also be successfully retrieved, matching the behavior of Direct Mode.
Actual behavior
Direct Mode: The document is retrieved as expected.
Gateway Mode: The query or ReadItemAsync call returns empty results or fails to retrieve the document.
Environment summary
SDK Version: 3.46.0
OS Version (e.g. Windows, Linux, MacOSX)
The text was updated successfully, but these errors were encountered:
Describe the bug
In Gateway Mode, certain queries or ReadItemAsync calls to Azure Cosmos DB return empty results or fail to retrieve documents, even though the documents exist in the database. The issue occurs when resource IDs or query parameters contain special characters (e.g., + | < > $ \ /). The same operations work correctly in Direct Mode. After switching back to Direct Mode, all queries return the correct results. This issue prevents consistent use of Gateway Mode.
To Reproduce
Create a document in Azure Cosmos DB with an ID containing special characters, such as ">test" or "%3Etest".
Attempt to retrieve the document using:
Perform the same operation in both Direct Mode and Gateway Mode.
Expected behavior
Direct Mode: The document should be successfully retrieved.
Gateway Mode: The document should also be successfully retrieved, matching the behavior of Direct Mode.
Actual behavior
Direct Mode: The document is retrieved as expected.
Gateway Mode: The query or ReadItemAsync call returns empty results or fails to retrieve the document.
Environment summary
SDK Version: 3.46.0
OS Version (e.g. Windows, Linux, MacOSX)
The text was updated successfully, but these errors were encountered: