-
Notifications
You must be signed in to change notification settings - Fork 187
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
Wrong type leading to a tricky ECONNRESET bug #1419
Comments
Ok it seems the ECONRESET error isn't that simple. I'm able to reproduce it on simple queries by adding filters or sorts as well... It's difficult to pinpoint why exactly it happens but it does seem to be affected by mishandling of bad requests (should throw 4XX error instead) |
I managed to isolate the issue to a single endpoint and am able to consistently reproduce it. The erroring URL is a GET request to
After digging into the Looker SDK code base, the error returned is: {
"name": "RequestError",
"message": "Error: socket hang up",
"cause": {
"code": "ECONNRESET"
},
"error": {
"code": "ECONNRESET"
},
"options": {
"encoding": null,
"headers": {
"x-looker-appid": "...",
"Authorization": "Bearer $OBFUSCATED$"
},
"json": null,
"method": "GET",
"rejectUnauthorized": true,
"resolveWithFullResponse": true,
"timeout": 120000,
"url": "https://$OBFUSCATED.looker.com:19999/api/4.0/queries/751560/run/json_bi?limit=1"
"simple": true,
"transform2xxOnly": false
}
} And the erroring is caught here:
|
On further inspection, it seems that the Using the This is quite strange but I am able to reproduce the results (tried 5 times). Confusingly, This works:
This throws ECONNRESET each time (for some queries):
|
Bugs
limit
is invalid for theIRequestRunQuery
.limit
Explanation
The
limit
property is defined as a string for theWriteQuery
type (used for creating a query or running it inline) but defined as a number for theIRequestRunQuery
type (used for running a previously created query).Not only is this confusing...but it's also wrong.
Passing a number for the run query API calls errors with ECONNRESET every time.
Changing the
1
to a"1"
does not lead to an ECONNRESET anymore but does conflict with the existing types and thus must be@ts-ignore
-ed.Note: the run query call also errors with ECONNRESET for any invalid value for
limit
, such as an empty string""
:The text was updated successfully, but these errors were encountered: