Exception: cross partition query can not be directly served in Azure Cosmos DB query

浪子不回头ぞ 提交于 2019-12-24 07:07:01

问题


I get the following exception while making a query to Azure Cosmos DB. I am unable to understand the exact problem with this exception. It used to work earlier and I am sure that no recent changes were made to azure cosmos DB. Can anyone suggest how to proceed forward in fixing this exception.

DocumentClientException: The provided by the gateway. This is a first chance (internal) exception that all newer clients will know how to handle gracefully. This exception is traced, but unless you see it bubble up as an exception (which only happens on older SDK clients), then you can safely ignore this message.


回答1:


The 1.4.1 version is a really old SDK. The SDKs populate the version header so that the server would know which version should handle this request but it seems like in this case something has changed on the server side.

Upgrading to latest SDK version will fix the issue (as discussed in the comments).



来源:https://stackoverflow.com/questions/54551708/exception-cross-partition-query-can-not-be-directly-served-in-azure-cosmos-db-q

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!