terminusdb-client-js icon indicating copy to clipboard operation
terminusdb-client-js copied to clipboard

queryDocument returns empty string when no results are found

Open rrooij opened this issue 3 years ago • 2 comments

The function queryDocument returns an empty string when a document can't be found. This is very confusing! As you can't check for the result being null or undefined. It should either throw some kind of exception OR return NULL.

rrooij avatar Oct 20 '22 13:10 rrooij

when a document can't be found the server return an empty string or an empty array if you add "as_list":true in the request parameters

I think it is correct
the queryDocument (we use getDocument now queryDocument is deprecated) returns only the server answer

Francesca-Bit avatar Jan 04 '23 14:01 Francesca-Bit

we need a way to streaming the result when as_list is false

Francesca-Bit avatar Mar 13 '23 13:03 Francesca-Bit