{"record":{"id":"9c733a52ab6aa4ef","repo":"grafana/k6","slug":"canceled-by-client-k6","errorCode":null,"errorMessage":"canceled by client (k6)","messagePattern":"canceled by client \\(k6\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/netext/grpcext/stream.go","lineNumber":30,"sourceCode":"\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/types/dynamicpb\"\n\t\"google.golang.org/protobuf/types/known/emptypb\"\n)\n\n// Stream is the wrapper around the grpc.ClientStream\n// with some handy methods.\ntype Stream struct {\n\tmethod                 string\n\tmethodDescriptor       protoreflect.MethodDescriptor\n\tdiscardResponseMessage bool\n\traw                    grpc.ClientStream\n\tmarshaler              protojson.MarshalOptions\n\tunmarshaler            protojson.UnmarshalOptions\n}\n\n// ErrCanceled canceled by client (k6)\nvar ErrCanceled = errors.New(\"canceled by client (k6)\")\n\n// ReceiveConverted receives a converted message from the stream\n// if the stream has been closed successfully, it returns io.EOF\n// if the stream has been cancelled, it returns ErrCanceled\nfunc (s *Stream) ReceiveConverted() (any, error) {\n\traw, err := s.receive()\n\tif err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, err\n\t}\n\n\tif s.discardResponseMessage {\n\t\treturn struct{}{}, err\n\t}\n\n\tmsg, errConv := convert(s.marshaler, raw)\n\tif errConv != nil {\n\t\treturn nil, errConv\n\t}","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/lib/netext/grpcext/stream.go#L12-L48","documentation":"Error \"canceled by client (k6)\" thrown in grafana/k6.","triggerScenarios":"Thrown at internal/lib/netext/grpcext/stream.go:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}