{"record":{"id":"3d641bb5a44ff46d","repo":"grpc-ecosystem/grpc-gateway","slug":"invalid-field-path-component-w","errorCode":null,"errorMessage":"invalid field path component: %w","messagePattern":"invalid field path component: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/httprule/parse.go","lineNumber":222,"sourceCode":"\treturn variable{\n\t\tpath:     path,\n\t\tsegments: segs,\n\t}, nil\n}\n\nfunc (p *parser) fieldPath() (string, error) {\n\tc, err := p.accept(typeIdent)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tcomponents := []string{c}\n\tfor {\n\t\tif _, err := p.accept(\".\"); err != nil {\n\t\t\treturn strings.Join(components, \".\"), nil\n\t\t}\n\t\tc, err := p.accept(typeIdent)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"invalid field path component: %w\", err)\n\t\t}\n\t\tcomponents = append(components, c)\n\t}\n}\n\n// A termType is a type of terminal symbols.\ntype termType string\n\n// These constants define some of valid values of termType.\n// They improve readability of parse functions.\n//\n// You can also use \"/\", \"*\", \"**\", \".\" or \"=\" as valid values.\nconst (\n\ttypeIdent   = termType(\"ident\")\n\ttypeLiteral = termType(\"literal\")\n\ttypeEOF     = termType(\"$\")\n)\n","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/internal/httprule/parse.go#L204-L240","documentation":"Parser error from parser.fieldPath: after a '.' separator inside a variable's field path, the next token is not a valid identifier (expectIdent failed). A template like '{a..b}' or '{a.123}' is rejected; the wrapped error identifies the bad component.","triggerScenarios":"Thrown at internal/httprule/parse.go:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure each dot-separated component of the field path is a valid proto identifier (letter/underscore first, alphanumerics after).","Remove stray dots from the variable expression."],"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"}