{"record":{"id":"9fcea77e23873ee9","repo":"hashicorp/nomad","slug":"error-querying-host-volumes-w","errorCode":null,"errorMessage":"Error querying host volumes: %w","messagePattern":"Error querying host volumes: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"command/volume_status_host.go","lineNumber":67,"sourceCode":"\tstr, err := formatHostVolume(vol, opts)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error formatting host volume: %w\", err)\n\t}\n\tc.Ui.Output(c.Colorize().Color(str))\n\treturn nil\n}\n\nfunc (c *VolumeStatusCommand) hostVolumeList(client *api.Client, nodeID, nodePool string, opts formatOpts) error {\n\tif !(opts.json || len(opts.template) > 0) {\n\t\tc.Ui.Output(c.Colorize().Color(\"[bold]Dynamic Host Volumes[reset]\"))\n\t}\n\n\tvols, _, err := client.HostVolumes().List(&api.HostVolumeListRequest{\n\t\tNodeID:   nodeID,\n\t\tNodePool: nodePool,\n\t}, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error querying host volumes: %w\", err)\n\t}\n\tif len(vols) == 0 {\n\t\tc.Ui.Error(\"No dynamic host volumes\")\n\t\treturn nil // empty is not an error\n\t}\n\n\tstr, err := formatHostVolumes(vols, opts)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error formatting host volumes: %w\", err)\n\t}\n\tc.Ui.Output(c.Colorize().Color(str))\n\treturn nil\n}\n\nfunc getHostVolumeByPrefix(client *api.Client, prefix, ns string) (*api.HostVolumeStub, []*api.HostVolumeStub, error) {\n\tvols, _, err := client.HostVolumes().List(nil, &api.QueryOptions{\n\t\tPrefix:    prefix,\n\t\tNamespace: ns,","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/command/volume_status_host.go#L49-L85","documentation":"Fires in hostVolumeList when the API call listing dynamic host volumes fails (server error, bad node/node-pool filter, or connectivity problem), so the volume listing cannot be shown.","triggerScenarios":"Thrown at command/volume_status_host.go:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify cluster connectivity and ACL token permissions for host volumes","Check the node ID / node pool filter values are valid","Retry if the server was temporarily unavailable"],"exampleFix":null,"handlingStrategy":"try-catch","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"}