{"id":"1343fbce53aecbc5","repo":"docker/cli","slug":"error-while-copy-s-w","errorCode":null,"errorMessage":"error while Copy (%s): %w","messagePattern":"error while Copy \\((.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/system/dial_stdio.go","lineNumber":85,"sourceCode":"\t\terr = <-conn2stdout\n\tcase err = <-conn2stdout:\n\t\t// return immediately without waiting for stdin to be closed.\n\t\t// (stdin is never closed when tty)\n\t}\n\treturn err\n}\n\nfunc copier(to halfWriteCloser, from halfReadCloser, debugDescription string) error {\n\tdefer func() {\n\t\tif err := from.CloseRead(); err != nil {\n\t\t\tlogrus.Errorf(\"error while CloseRead (%s): %v\", debugDescription, err)\n\t\t}\n\t\tif err := to.CloseWrite(); err != nil {\n\t\t\tlogrus.Errorf(\"error while CloseWrite (%s): %v\", debugDescription, err)\n\t\t}\n\t}()\n\tif _, err := io.Copy(to, from); err != nil {\n\t\treturn fmt.Errorf(\"error while Copy (%s): %w\", debugDescription, err)\n\t}\n\treturn nil\n}\n\ntype halfReadCloser interface {\n\tio.Reader\n\tCloseRead() error\n}\n\ntype halfWriteCloser interface {\n\tio.Writer\n\tCloseWrite() error\n}\n\ntype halfCloser interface {\n\thalfReadCloser\n\thalfWriteCloser\n}","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/system/dial_stdio.go#L67-L103","documentation":"Error \"error while Copy (%s): %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/system/dial_stdio.go:85 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}