{"id":"6fbc57c4b87bc528","repo":"docker/cli","slug":"invalid-detach-keys-s-w","errorCode":null,"errorMessage":"invalid detach keys (%s): %w","messagePattern":"invalid detach keys \\((.+?)\\): %w","errorType":"validation","errorClass":"invalidParameter","httpStatus":null,"severity":"error","filePath":"cli/command/container/hijack.go","lineNumber":38,"sourceCode":"\n// readCloserWrapper wraps an io.Reader, and implements an io.ReadCloser\n// It calls the given callback function when closed.\ntype readCloserWrapper struct {\n\tio.Reader\n\tcloser func() error\n}\n\n// Close calls back the passed closer function\nfunc (r *readCloserWrapper) Close() error {\n\treturn r.closer()\n}\n\nfunc validateDetachKeys(keys string) error {\n\tif keys == \"\" {\n\t\treturn nil\n\t}\n\tif _, err := term.ToBytes(keys); err != nil {\n\t\treturn invalidParameter(fmt.Errorf(\"invalid detach keys (%s): %w\", keys, err))\n\t}\n\treturn nil\n}\n\n// A hijackedIOStreamer handles copying input to and output from streams to the\n// connection.\ntype hijackedIOStreamer struct {\n\tstreams      command.Streams\n\tinputStream  io.ReadCloser\n\toutputStream io.Writer\n\terrorStream  io.Writer\n\n\tresp client.HijackedResponse\n\n\ttty        bool\n\tdetachKeys string\n}\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/container/hijack.go#L20-L56","documentation":"Error \"invalid detach keys (%s): %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/container/hijack.go:38 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}