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

Cosmos response headers uses the wrong header key #310

Closed
justinbarclay opened this issue Jun 19, 2021 · 0 comments · Fixed by #311
Closed

Cosmos response headers uses the wrong header key #310

justinbarclay opened this issue Jun 19, 2021 · 0 comments · Fixed by #311
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.

Comments

@justinbarclay
Copy link
Contributor

justinbarclay commented Jun 19, 2021

I ran into an error when running your cosmos db examples.

For example, when running

cargo run --example document_entries_00 test test

I'd get the output:

Created 5 documents.
Error: AzureCoreError(HeaderNotFound("x-ms-max-item-count"))

Which means it was failing when listing documents.

After doing a lot of digging around, more than I'd like to admit, I came to the conclusion that your CosmosDB response headers are set up incorrectly.

For example, here, you call a function item_count_from_headers. This function checks for the HTTP header "x-ms-max-item-count", which is an optional request header. Instead, I think "x-ms-item-count" is meant to be the response header.

@rylev rylev added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants