{"id":"11af0701fb0f9823","repo":"docker/cli","slug":"missing-task-id-in-details-s","errorCode":null,"errorMessage":"missing task id in details: %s","messagePattern":"missing task id in details: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/service/logs.go","lineNumber":350,"sourceCode":"}\n\n// parseContext returns a log context and REMOVES the context from the details map\nfunc parseContext(details map[string]string) (logContext, error) {\n\tnodeID, ok := details[\"com.docker.swarm.node.id\"]\n\tif !ok {\n\t\treturn logContext{}, fmt.Errorf(\"missing node id in details: %v\", details)\n\t}\n\tdelete(details, \"com.docker.swarm.node.id\")\n\n\tserviceID, ok := details[\"com.docker.swarm.service.id\"]\n\tif !ok {\n\t\treturn logContext{}, fmt.Errorf(\"missing service id in details: %v\", details)\n\t}\n\tdelete(details, \"com.docker.swarm.service.id\")\n\n\ttaskID, ok := details[\"com.docker.swarm.task.id\"]\n\tif !ok {\n\t\treturn logContext{}, fmt.Errorf(\"missing task id in details: %s\", details)\n\t}\n\tdelete(details, \"com.docker.swarm.task.id\")\n\n\treturn logContext{\n\t\tnodeID:    nodeID,\n\t\tserviceID: serviceID,\n\t\ttaskID:    taskID,\n\t}, nil\n}\n\ntype logContext struct {\n\tnodeID    string\n\tserviceID string\n\ttaskID    string\n}\n","sourceCodeStart":332,"sourceCodeEnd":366,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/service/logs.go#L332-L366","documentation":"Error \"missing task id in details: %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/service/logs.go:350 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}