{"record":{"id":"01d3c56baa7f017b","repo":"grafana/k6","slug":"not-found-s","errorCode":null,"errorMessage":"not found: %s","messagePattern":"not found: (.+?)","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"internal/loader/loader.go","lineNumber":222,"sourceCode":"func fetch(logger logrus.FieldLogger, u string) ([]byte, error) {\n\tlogger.WithField(\"url\", u).Debug(\"Fetching source...\")\n\tstartTime := time.Now()\n\tctx, cancel := context.WithTimeout(context.Background(), time.Minute)\n\tdefer cancel()\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, u, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := http.DefaultClient.Do(req) //nolint:gosec\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = res.Body.Close() }()\n\n\tif res.StatusCode != http.StatusOK {\n\t\tswitch res.StatusCode {\n\t\tcase http.StatusNotFound:\n\t\t\treturn nil, fmt.Errorf(\"not found: %s\", u)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"wrong status code (%d) for: %s\", res.StatusCode, u)\n\t\t}\n\t}\n\n\tdata, err := io.ReadAll(res.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlogger.WithFields(logrus.Fields{\n\t\t\"url\": u,\n\t\t\"t\":   time.Since(startTime),\n\t\t\"len\": len(data),\n\t}).Debug(\"Fetched!\")\n\treturn data, nil\n}\n","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/loader/loader.go#L204-L240","documentation":"Raised in fetch when loading a remote module over https returns HTTP 404. It means the URL was reachable but the resource no longer exists — a broken or moved module link, not a network failure. The at-fault input is the fetched URL that returned 404.","triggerScenarios":"Thrown at internal/loader/loader.go:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the module URL is correct and still published","Pin to a version that exists (check the CDN/repository for the current path)","Replace with a locally vendored copy of the module"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}