{"record":{"id":"9dd070164b79f192","repo":"hashicorp/nomad","slug":"failed-to-parse-collection-interval-v-9dd070","errorCode":null,"errorMessage":"failed to parse collection interval: %v","messagePattern":"failed to parse collection interval: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/drivers/server.go","lineNumber":263,"sourceCode":"\t\t\tpbNet.PortMap[k] = int32(v)\n\t\t}\n\t}\n\n\tresp := &proto.InspectTaskResponse{\n\t\tTask: protoStatus,\n\t\tDriver: &proto.TaskDriverStatus{\n\t\t\tAttributes: status.DriverAttributes,\n\t\t},\n\t\tNetworkOverride: pbNet,\n\t}\n\n\treturn resp, nil\n}\n\nfunc (b *driverPluginServer) TaskStats(req *proto.TaskStatsRequest, srv proto.Driver_TaskStatsServer) error {\n\tinterval, err := ptypes.Duration(req.CollectionInterval)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse collection interval: %v\", err)\n\t}\n\n\tch, err := b.impl.TaskStats(srv.Context(), req.TaskId, interval)\n\tif err != nil {\n\t\tif rec, ok := err.(structs.Recoverable); ok {\n\t\t\tst := status.New(codes.FailedPrecondition, rec.Error())\n\t\t\tst, err := st.WithDetails(&sproto.RecoverableError{Recoverable: rec.IsRecoverable()})\n\t\t\tif err != nil {\n\t\t\t\t// If this error, it will always error\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t\treturn st.Err()\n\t\t}\n\t\treturn err\n\t}\n\n\tfor stats := range ch {\n\t\tpb, err := TaskStatsToProto(stats)","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/plugins/drivers/server.go#L245-L281","documentation":"Returned by the driver plugin server's TaskStats handler when ptypes.Duration fails to decode the collection interval from the TaskStatsRequest. Stats streaming cannot be paced without a valid interval.","triggerScenarios":"Thrown at plugins/drivers/server.go:263 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send a valid protobuf duration as the collection interval","Align client and driver proto definitions"],"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"}