-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix error_code tag values #1104
Comments
Slightly connected to this, but we should see if we properly detect the |
Something else strange is that the |
We don't handle error messages and error codes for request timeouts properly. Consider the following script: import http from "k6/http";
export default function () {
let resp = http.get("https://httpbin.org/delay/5", { timeout: 3000 });
console.log(resp.error);
console.log(resp.error_code);
} with k6 v0.26.1, we'd get something like this:
and with k6 v0.26.0:
The difference in error message is probably caused by #1261, but in both cases we don't handle the error code properly. |
I've opened this to take a stab at timeouts - arguably it seems like this issue references a more holistic refactor of error codes but timeouts happen frequently enough that I think they're worth fixing in the short term |
Quite a lot of errors now result in an
error_code
metric tag value of1000
, i.e. the most generic catch-all error code we have. In a recent sample of production errors, here are the aggregated counts of errors with 1000 forerror_code
:http: ContentLength=??? with Body length???http: Request.ContentLength=??? with nilBodyhttp2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this errorThe
http: Request.ContentLength=??? with nil Body
error is better described in #1094, while theGetBody
-mentioning error is already fixed inmaster
by #1093.Also, it might be a good idea to rename the current
errCode
type and the constants, as discussed in #1102 (comment)The text was updated successfully, but these errors were encountered: