question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Headers no longer available in 1.10.0

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
moderakhcommented, Aug 15, 2017

@saibotsivad we will support returning request charge if you use queryIterator.executeNext(callback(err, resources, headers)) In case of a cross partition query headers 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.

0reactions
saibotsivadcommented, Aug 15, 2017

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found