{"id":"c155ce7119b39955","repo":"docker/cli","slug":"unable-to-get-endpoint-from-context-q","errorCode":null,"errorMessage":"unable to get endpoint from context %q","messagePattern":"unable to get endpoint from context %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/context/options.go","lineNumber":103,"sourceCode":"\t\t\terrs = append(errs, errors.New(\"unrecognized config key: \"+k))\n\t\t}\n\t}\n\treturn errors.Join(errs...)\n}\n\nfunc getDockerEndpoint(contextStore store.Reader, config map[string]string) (docker.Endpoint, error) {\n\tif err := validateConfig(config, allowedDockerConfigKeys); err != nil {\n\t\treturn docker.Endpoint{}, err\n\t}\n\tif contextName, ok := config[keyFrom]; ok {\n\t\tmetadata, err := contextStore.GetMetadata(contextName)\n\t\tif err != nil {\n\t\t\treturn docker.Endpoint{}, err\n\t\t}\n\t\tif ep, ok := metadata.Endpoints[docker.DockerEndpoint].(docker.EndpointMeta); ok {\n\t\t\treturn docker.Endpoint{EndpointMeta: ep}, nil\n\t\t}\n\t\treturn docker.Endpoint{}, fmt.Errorf(\"unable to get endpoint from context %q\", contextName)\n\t}\n\ttlsData, err := context.TLSDataFromFiles(config[keyCA], config[keyCert], config[keyKey])\n\tif err != nil {\n\t\treturn docker.Endpoint{}, err\n\t}\n\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()","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/context/options.go#L85-L121","documentation":"Error \"unable to get endpoint from context %q\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/context/options.go:103 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}