{"record":{"id":"5dfc8872b87f6fac","repo":"grpc-ecosystem/grpc-gateway","slug":"s-s-s-is-a-protobuf-message-type-protobuf-mes","errorCode":null,"errorMessage":"%s.%s: %s is a protobuf message type. Protobuf message types cannot be used as path parameters, use a scalar value type (such as string) instead","messagePattern":"(.+?)\\.(.+?): (.+?) is a protobuf message type\\. Protobuf message types cannot be used as path parameters, use a scalar value type \\(such as string\\) instead","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/descriptor/services.go","lineNumber":269,"sourceCode":"\tif err != nil {\n\t\treturn Parameter{}, err\n\t}\n\tl := len(fields)\n\tif l == 0 {\n\t\treturn Parameter{}, fmt.Errorf(\"invalid field access list for %s\", path)\n\t}\n\ttarget := fields[l-1].Target\n\tswitch target.GetType() {\n\tcase descriptorpb.FieldDescriptorProto_TYPE_MESSAGE, descriptorpb.FieldDescriptorProto_TYPE_GROUP:\n\t\tif grpclog.V(2) {\n\t\t\tgrpclog.Infoln(\"found aggregate type:\", target, target.TypeName)\n\t\t}\n\t\tif IsWellKnownType(*target.TypeName) {\n\t\t\tif grpclog.V(2) {\n\t\t\t\tgrpclog.Infoln(\"found well known aggregate type:\", target)\n\t\t\t}\n\t\t} else {\n\t\t\treturn Parameter{}, fmt.Errorf(\"%s.%s: %s is a protobuf message type. Protobuf message types cannot be used as path parameters, use a scalar value type (such as string) instead\", meth.Service.GetName(), meth.GetName(), path)\n\t\t}\n\t}\n\treturn Parameter{\n\t\tFieldPath: FieldPath(fields),\n\t\tMethod:    meth,\n\t\tTarget:    fields[l-1].Target,\n\t}, nil\n}\n\nfunc (r *Registry) newBody(meth *Method, path string) (*Body, error) {\n\tswitch path {\n\tcase \"\":\n\t\treturn nil, nil\n\tcase \"*\":\n\t\treturn &Body{FieldPath: nil}, nil\n\t}\n\tmsg := meth.RequestType\n\tfields, err := r.resolveFieldPath(msg, path, false)","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/internal/descriptor/services.go#L251-L287","documentation":"Validation error from Registry.newParam: the final component of the path-parameter field path is a protobuf message (or group) type that is not a well-known type. Non-WKT messages cannot be serialized into a single URL path segment, so the parameter cannot be built and generation fails; the error names the method, field and suggested scalar alternative.","triggerScenarios":"Thrown at internal/descriptor/services.go:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a scalar field (string, int, etc.) as the path parameter instead of a nested message.","If a well-known type (e.g. google.protobuf.Timestamp) is needed, confirm it is recognized by IsWellKnownType.","Restructure the request so the message goes in the body or query parameters."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a58a4436a376a4bcc7d8f10c4d4f919a8438bba9","analyzedAt":"2026-09-02T10:28:31.537Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}