{"id":"8f22c1fb39a9f2e6","repo":"docker/cli","slug":"unable-to-apply-docker-endpoint-options-w","errorCode":null,"errorMessage":"unable to apply docker endpoint options: %w","messagePattern":"unable to apply docker endpoint options: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/context/options.go","lineNumber":127,"sourceCode":"\tskipTLSVerify, err := parseBool(config, keySkipTLSVerify)\n\tif err != nil {\n\t\treturn docker.Endpoint{}, err\n\t}\n\tep := docker.Endpoint{\n\t\tEndpointMeta: docker.EndpointMeta{\n\t\t\tHost:          config[keyHost],\n\t\t\tSkipTLSVerify: skipTLSVerify,\n\t\t},\n\t\tTLSData: tlsData,\n\t}\n\t// try to resolve a docker client, validating the configuration\n\topts, err := ep.ClientOpts()\n\tif err != nil {\n\t\treturn docker.Endpoint{}, fmt.Errorf(\"invalid docker endpoint options: %w\", err)\n\t}\n\t// FIXME(thaJeztah): this creates a new client (but discards it) only to validate the options; are the validation steps above not enough?\n\tif _, err := client.New(opts...); err != nil {\n\t\treturn docker.Endpoint{}, fmt.Errorf(\"unable to apply docker endpoint options: %w\", err)\n\t}\n\treturn ep, nil\n}\n\nfunc getDockerEndpointMetadataAndTLS(contextStore store.Reader, config map[string]string) (docker.EndpointMeta, *store.EndpointTLSData, error) {\n\tep, err := getDockerEndpoint(contextStore, config)\n\tif err != nil {\n\t\treturn docker.EndpointMeta{}, nil, err\n\t}\n\treturn ep.EndpointMeta, ep.TLSData.ToStoreTLSData(), nil\n}\n","sourceCodeStart":109,"sourceCodeEnd":139,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/context/options.go#L109-L139","documentation":"Error \"unable to apply docker endpoint options: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/context/options.go:127 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}