Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeedIterator.ReadNextAsync() returns ErrorMessage with expired resourceToken #1034

Closed
fuocor opened this issue Nov 20, 2019 · 1 comment · Fixed by #1036
Closed

FeedIterator.ReadNextAsync() returns ErrorMessage with expired resourceToken #1034

fuocor opened this issue Nov 20, 2019 · 1 comment · Fixed by #1036
Assignees
Labels
bug Something isn't working QUERY

Comments

@fuocor
Copy link
Contributor

fuocor commented Nov 20, 2019

Describe the bug
I am not sure this is a bug but...
When calling FeedIterator.ReadNextAsync() with an expired/used ResourceToken the StatusCode == HttrpStatusCode.Forbidden and the content has

{"_rid":"LkF8AJd9jCE=","Documents":[],"_count":0}

and an ErrorMessage of:

Message: {"Errors":["Request is blocked. Please check your authorization token and Cosmos DB account firewall settings."]}ActivityId: b55cd9f7-3571-4846-aae1-7145b21d76ad, Request URI: /apps/DocDbApp/services/DocDbServer21/partitions/a4cb4961-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: {"responseStatisticsList":[{"RequestResponseTime":"2019-11-20T19:38:55.3835348Z","StoreResult":{"LSN":2140,"QuorumAckedLSN":2140,"GlobalCommittedLSN":-1,"NumberOfReadRegions":0,"ItemLSN":-1,"SessionToken":{"LSN":2140},"UsingLocalLSN":true,"RequestCharge":0.0,"CurrentReplicaSetSize":1,"CurrentWriteQuorum":-1,"IsValid":true,"IsGoneException":false,"IsNotFoundException":false,"IsInvalidPartitionException":false,"StorePhysicalAddress":"rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer21/partitions/a4cb4961-38c8-11e6-8106-8cdcd42c33be/replicas/1p/","IsClientCpuOverloaded":false},"RequestResourceType":2,"RequestOperationType":15}],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"ContactedReplicas":[],"FailedReplicas":[],"RegionsContacted":["https://127.0.0.1:8081/"],"RequestLatency":"00:00:00.3219483","IsCpuOverloaded":false}, SDK: Windows/10.0.17763 cosmos-netstandard-sdk/3.3.0

My question is that just about everywhere else in the SDK the messages seem to get pushed into the response content and headers. Is this by design?

Environment summary
SDK Version: Source
OS Version Windows 10

Additional context
Add any other context about the problem here (for example, complete stack traces or logs).

@j82w
Copy link
Contributor

j82w commented Nov 21, 2019

This is a bug. I have a PR out with the fix. The content will be null on failure.

@j82w j82w added the bug Something isn't working label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QUERY
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants