{"record":{"id":"5f4c9335868f17a4","repo":"getsops/sops","slug":"vault-path-does-not-seem-to-be-formatted-correctly","errorCode":null,"errorMessage":"vault path does not seem to be formatted correctly: (eg. https://vault.example.com:8200/v1/transit/keys/keyName)","messagePattern":"vault path does not seem to be formatted correctly: \\(eg\\. https://vault\\.example\\.com:8200/v1/transit/keys/keyName\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hcvault/keysource.go","lineNumber":472,"sourceCode":"\tif _, err := io.Copy(buf, f); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn strings.TrimSpace(buf.String()), nil\n}\n\n// engineAndKeyFromPath returns the engine path and key name from the full\n// path, or an error.\nfunc engineAndKeyFromPath(fullPath string) (enginePath, keyName string, err error) {\n\t// Running vault behind a reverse proxy with longer URLs seems not to be\n\t// supported by the Vault client API. Check for this here.\n\t// TODO(hidde): this may no longer be necessary with newer Vault versions,\n\t//  but needs to be confirmed.\n\tif re := regexp.MustCompile(`/[^/]+/v[\\d]+/[^/]+/[^/]+/[^/]+`); re.Match([]byte(fullPath)) {\n\t\terr = fmt.Errorf(\"running Vault with a prefixed URL is not supported! (Format has to be like \" +\n\t\t\t\"https://vault.example.com:8200/v1/transit/keys/keyName)\")\n\t\treturn\n\t} else if re := regexp.MustCompile(`/v[\\d]+/[^/]+/[^/]+/[^/]+`); !re.Match([]byte(fullPath)) {\n\t\terr = fmt.Errorf(\"vault path does not seem to be formatted correctly: (eg. \" +\n\t\t\t\"https://vault.example.com:8200/v1/transit/keys/keyName)\")\n\t\treturn\n\t}\n\n\tfullPath = strings.Trim(fullPath, \"/\")\n\tdirs := strings.Split(fullPath, \"/\")\n\n\tkeyName = dirs[len(dirs)-1]\n\tenginePath = path.Join(dirs[1 : len(dirs)-2]...)\n\treturn\n}\n","sourceCodeStart":454,"sourceCodeEnd":484,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/hcvault/keysource.go#L454-L484","documentation":"Error \"vault path does not seem to be formatted correctly: (eg. https://vault.example.com:8200/v1/transit/keys/keyName)\" thrown in getsops/sops.","triggerScenarios":"Thrown at hcvault/keysource.go:472 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13442bb98183887d7a9ac09ec8ab0564673a59d8","analyzedAt":"2026-09-01T03:53:00.447Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}