{"record":{"id":"73e95ac40402dd86","repo":"grafana/k6","slug":"fail-to-continue-request-id-s-w","errorCode":null,"errorMessage":"fail to continue request (id: %s): %w","messagePattern":"fail to continue request \\(id: (.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/network_manager.go","lineNumber":973,"sourceCode":"\t\t// Avoid logging as error when context is canceled.\n\t\t// Most probably this happens when trying to fail a site's background request\n\t\t// while the iteration is ending and therefore the browser context is being closed.\n\t\tif errors.Is(err, context.Canceled) {\n\t\t\tm.logger.Debug(\"NetworkManager:ContinueRequest\", \"context canceled continuing request\")\n\t\t\treturn nil\n\t\t}\n\n\t\t// This error message is an internal issue, rather than something that the user can\n\t\t// action on. It's also usually ok to ignore since it means that the page has navigated\n\t\t// away or something has occurred which means that the request is no longer needed and\n\t\t// isn't being tracked by chromium.\n\t\tif strings.Contains(err.Error(), \"Invalid InterceptionId\") {\n\t\t\tm.logger.Debugf(\"NetworkManager:ContinueRequest\", \"invalid interception ID (%s) continuing request: %s\",\n\t\t\t\trequestID, err)\n\t\t\treturn nil\n\t\t}\n\n\t\treturn fmt.Errorf(\"fail to continue request (id: %s): %w\", requestID, err)\n\t}\n\n\treturn nil\n}\n\nfunc (m *NetworkManager) FulfillRequest(request *Request, opts FulfillOptions) error {\n\tresponseCode := int64(http.StatusOK)\n\tif opts.Status != 0 {\n\t\tresponseCode = opts.Status\n\t}\n\n\taction := fetch.FulfillRequest(request.interceptionID, responseCode)\n\n\tif opts.ContentType != \"\" {\n\t\topts.Headers = append(opts.Headers, HTTPHeader{\n\t\t\tName:  \"Content-Type\",\n\t\t\tValue: opts.ContentType,\n\t\t})","sourceCodeStart":955,"sourceCodeEnd":991,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/js/modules/k6/browser/common/network_manager.go#L955-L991","documentation":"Failure of the CDP Fetch.continueRequest command for the identified request. Treated as usually benign: it typically means the page navigated away or the request finished before continuation, and context-canceled errors are swallowed. The request ID in the message identifies the affected request.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/network_manager.go:973 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Continue requests quickly in route handlers to avoid races with navigation","Treat as non-fatal when it occurs near page navigation or teardown","Ensure Fetch interception is still enabled when continuing a paused request"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}