Headers no longer available in 1.10.0
See original GitHub issueI just upgraded from 1.8.0 to 1.10.0 and the headers are no longer returned in this query:
client.queryDocuments(collectionLink, querySpec, options).toArray((err, items, headers) => {
I had a look in the code and don’t understand the logic completely, but it seems to recursively iterate over the results and overwrite the headers in the second recursion: https://github.com/Azure/azure-documentdb-node/blob/master/source/lib/queryIterator.js#L144
Added a quick patch to validate that headers are defined which solved the issue, but I don’t think this is the ideal solution. Is there a reason to recurse over the results? Is it that the iteration may trigger additional server requests?
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
B3 HTTP headers not propagated to ext_authz server in 1.10.0
I understand from the conversation there is no issue with grpc_service in all versions of envoy as well as there is no issue...
Read more >Class Header (1.10.0) | Python client library | Google Cloud
Solution to bridge existing care systems and apps on Google Cloud. ... No-code development platform to build and extend applications. ... Develop, deploy,...
Read more >doc_controls has not attribute 'inheritable headers'
I'm loosing a lot of time solving problems with dependencies between pip packages and pip packages and the underlying C/C++ libraries. Am I...
Read more >copy on code sign, where does version come from?
And yes, 1.10.1 is not compatible. Thus the 1.10.0 for compatible version for this library. This is a cross platform library built as...
Read more >Release Notes - NYC.ID - NYC4D
Added IPv6 Client IP validation to be used for DoITT CAPTCHA service. ... The Profile link no longer displays in header when logout...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@saibotsivad we will support returning request charge if you use
queryIterator.executeNext(callback(err, resources, headers))
In case of a cross partition queryheaders
will at least have the request charge.Feel free to send a PR for updating the documentation for executeNext(.) saying that headers will accessible as the third arg.
@moderakh Previously this issue was marked as closed because it was a “non-documented feature”. I still don’t see the headers as being a documented returned property, so even if it works now with the latest version of documentdb it doesn’t sound like there is any guarantee that it will work in the future.
Do you know if there is an intent to document the headers in the
queryIterator.executeNext
method at some point? I imagine that might take a while?