You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying Looker using the Node SDK, we occasionally see an Error: Unexpected end of JSON input. This is coming from the parseResponse() function in nodeTransport.js:
In this instance, the response is actually empty, and JSON.parse("") throws an error.
The error is not particularly good or informative. In fact, I don't know whether the library should throw an error on an empty response or not, but a JSON parse error is definitely not what I'd expect.
Why is the API returning an empty response in the first place? The sample query where I was able to reproduce this does not actually run in the Looker SQL editor either, failing with ERROR: Operation not allowed on schema "pg_internal". Fair enough, that's probably an error on my part with the test data; but I would have expected some kind of informative error response rather than an empty string that then causes a parse error.
It is not entirely clear whether all instances of this error are related to models that fail when queried from the Looker web UI; if I can obtain more information on that, I will update this ticket.
The text was updated successfully, but these errors were encountered:
When querying Looker using the Node SDK, we occasionally see an
Error: Unexpected end of JSON input
. This is coming from theparseResponse()
function innodeTransport.js
:In this instance, the response is actually empty, and
JSON.parse("")
throws an error.ERROR: Operation not allowed on schema "pg_internal"
. Fair enough, that's probably an error on my part with the test data; but I would have expected some kind of informative error response rather than an empty string that then causes a parse error.The text was updated successfully, but these errors were encountered: