{"record":{"id":"160f8d9ce28f19d5","repo":"microsoft/semantic-kernel","slug":"unknown-type-type","errorCode":null,"errorMessage":"Unknown type {type}","messagePattern":"Unknown type (.+?)","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Functions/Functions.Grpc/GrpcOperationRunner.cs","lineNumber":351,"sourceCode":"    private static Type GetNetType(string type) =>\n        type switch\n        {\n            \"TYPE_DOUBLE\" => typeof(double),\n            \"TYPE_FLOAT\" => typeof(float),\n            \"TYPE_INT64\" => typeof(long),\n            \"TYPE_UINT64\" => typeof(ulong),\n            \"TYPE_INT32\" => typeof(int),\n            \"TYPE_FIXED64\" => typeof(ulong),\n            \"TYPE_FIXED32\" => typeof(uint),\n            \"TYPE_BOOL\" => typeof(bool),\n            \"TYPE_STRING\" => typeof(string),\n            \"TYPE_BYTES\" => typeof(byte[]),\n            \"TYPE_UINT32\" => typeof(uint),\n            \"TYPE_SFIXED32\" => typeof(int),\n            \"TYPE_SFIXED64\" => typeof(long),\n            \"TYPE_SINT32\" => typeof(int),\n            \"TYPE_SINT64\" => typeof(long),\n            _ => throw new ArgumentException($\"Unknown type {type}\", nameof(type)),\n        };\n}\n","sourceCodeStart":333,"sourceCodeEnd":354,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Functions/Functions.Grpc/GrpcOperationRunner.cs#L333-L354","documentation":"Thrown by GetNetType's switch expression when a protobuf field type enum value is not one of the recognized TYPE_* cases (DOUBLE, FLOAT, INT64, ... BYTES, etc.). The default arm raises ArgumentException naming the unrecognized type token.","triggerScenarios":"A FieldDescriptorProto.Type value outside the handled set — typically a newer protobuf type (e.g. enum-typed or message-typed fields that arrive as a Type enum the switch doesn't map) or a corrupt descriptor.","commonSituations":"Using complex message/enum/map fields in the .proto that the runner does not yet support; protobuf-schema features ahead of the supported set.","solutions":["Restrict the .proto operation payload to primitive scalar types the switch handles.","Avoid enum-typed, message-typed, or map fields in the gRPC operation contract used by this runner.","If you need an unsupported type, pass it as a string and handle conversion yourself."],"exampleFix":"// before\n// .proto field: repeated Item items = 1; (message type)\n// after\n// .proto field: string items_json = 1; (primitive)","handlingStrategy":"validation","validationCode":"// Inspect your .proto: only use scalar types this runner maps (TYPE_STRING, TYPE_INT32, ...).","typeGuard":null,"tryCatchPattern":"try { /* invoke */ }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"Unknown type\")) {\n    // a field type is unsupported; simplify the .proto\n}","preventionTips":["Restrict operation payloads to supported protobuf scalar types.","Avoid enum/message/map fields in runner contracts."],"tags":["grpc","protobuf","type-mapping"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}