grpc-ecosystem/grpc-gateway · error
unsupported field type %s of parameter %s in %s.%s
Error message
unsupported field type %s of parameter %s in %s.%s
What it means
Mapping error from Parameter.ConvertFuncExpr: the parameter's proto field type has no entry in the selected conversion table (proto2/proto3, repeated/optional variants) nor in wellKnownTypeConv. The gateway cannot generate the string-to-value conversion code for this parameter kind (e.g. group or unsupported WKT), so it fails with the field type, parameter name and parent method.
Source
Thrown at internal/descriptor/types.go:298
// The converter function converts a string into a value for the parameter.
func (p Parameter) ConvertFuncExpr() (string, error) {
tbl := proto3ConvertFuncs
if !p.IsProto2() && p.IsRepeated() {
tbl = proto3RepeatedConvertFuncs
} else if !p.IsProto2() && p.IsOptionalProto3() {
tbl = proto3OptionalConvertFuncs
} else if p.IsProto2() && !p.IsRepeated() {
tbl = proto2ConvertFuncs
} else if p.IsProto2() && p.IsRepeated() {
tbl = proto2RepeatedConvertFuncs
}
typ := p.Target.GetType()
conv, ok := tbl[typ]
if !ok {
conv, ok = wellKnownTypeConv[p.Target.GetTypeName()]
}
if !ok {
return "", fmt.Errorf("unsupported field type %s of parameter %s in %s.%s", typ, p.FieldPath, p.Method.Service.GetName(), p.Method.GetName())
}
return conv, nil
}
// IsEnum returns true if the field is an enum type, otherwise false is returned.
func (p Parameter) IsEnum() bool {
return p.Target.GetType() == descriptorpb.FieldDescriptorProto_TYPE_ENUM
}
// IsRepeated returns true if the field is repeated, otherwise false is returned.
func (p Parameter) IsRepeated() bool {
return p.Target.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED
}
// IsProto2 returns true if the field is proto2, otherwise false is returned.
func (p Parameter) IsProto2() bool {
return p.Target.Message.File.proto2()
}View on GitHub (pinned to a58a4436a3)
Solutions
- Change the parameter to a supported scalar or well-known type.
- Avoid group types and exotic WKTs as path/query parameters.
- Update grpc-gateway if a newer version maps the type.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/descriptor/types.go:298 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grpc-ecosystem/grpc-gateway@a58a4436a3 (2026-09-02).
Data as JSON: /api/errors/e416b4763bab134d.
Report an issue: GitHub.