{"record":{"id":"d3738eb29b97e113","repo":"hashicorp/nomad","slug":"failed-to-parse-node-list-fields-v","errorCode":null,"errorMessage":"Failed to parse node list fields: %v","messagePattern":"Failed to parse node list fields: (.+?)","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"command/agent/node_endpoint.go","lineNumber":28,"sourceCode":"\n\t\"github.com/hashicorp/nomad/api\"\n\t\"github.com/hashicorp/nomad/nomad/structs\"\n)\n\nfunc (s *HTTPServer) NodesRequest(resp http.ResponseWriter, req *http.Request) (any, error) {\n\tif req.Method != http.MethodGet {\n\t\treturn nil, CodedError(405, ErrInvalidMethod)\n\t}\n\n\targs := structs.NodeListRequest{}\n\tif s.parse(resp, req, &args.Region, &args.QueryOptions) {\n\t\treturn nil, nil\n\t}\n\n\t// Parse fields selection.\n\tfields, err := parseNodeListStubFields(req)\n\tif err != nil {\n\t\treturn nil, CodedError(http.StatusBadRequest, fmt.Errorf(\"Failed to parse node list fields: %v\", err).Error())\n\t}\n\targs.Fields = fields\n\n\tvar out structs.NodeListResponse\n\tif err := s.agent.RPC(\"Node.List\", &args, &out); err != nil {\n\t\treturn nil, err\n\t}\n\n\tsetMeta(resp, &out.QueryMeta)\n\tif out.Nodes == nil {\n\t\tout.Nodes = make([]*structs.NodeListStub, 0)\n\t}\n\n\treturn out.Nodes, nil\n}\n\nfunc (s *HTTPServer) NodeSpecificRequest(resp http.ResponseWriter, req *http.Request) (any, error) {\n\tpath := strings.TrimPrefix(req.URL.Path, \"/v1/node/\")","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/command/agent/node_endpoint.go#L10-L46","documentation":"The /v1/nodes HTTP handler returns HTTP 400 when parseNodeListStubFields cannot interpret the fields-selection query parameters, wrapping the parse error; it is a request-parameter validation failure, not a server fault.","triggerScenarios":"Thrown at command/agent/node_endpoint.go:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the fields query parameter to contain valid comma-separated node stub field names","Remove the fields parameter to get all default fields","Check the API client version matches the server's supported field names"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}