{"record":{"id":"9a13155e4a91192f","repo":"JuliusBrussee/caveman","slug":"objectstore-production-endpoint-must-be-an-https","errorCode":null,"errorMessage":"objectstore: production endpoint must be an HTTPS origin without credentials, path, query, or fragment","messagePattern":"objectstore: production endpoint must be an HTTPS origin without credentials, path, query, or fragment","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/objectstore/objectstore.go","lineNumber":207,"sourceCode":"\tif strings.TrimSpace(cfg.Endpoint) == \"\" || strings.TrimSpace(cfg.Bucket) == \"\" {\n\t\treturn errors.New(\"objectstore: endpoint and bucket are required\")\n\t}\n\tif strings.TrimSpace(cfg.AccessKey) == \"\" || strings.TrimSpace(cfg.SecretKey) == \"\" {\n\t\treturn errors.New(\"objectstore: access key and secret key are required\")\n\t}\n\tif !production {\n\t\treturn nil\n\t}\n\tif !cfg.UseSSL || strings.HasPrefix(strings.ToLower(strings.TrimSpace(cfg.Endpoint)), \"http://\") {\n\t\treturn errors.New(\"objectstore: production requires TLS\")\n\t}\n\traw := strings.TrimSpace(cfg.Endpoint)\n\tif !strings.Contains(raw, \"://\") {\n\t\traw = \"https://\" + raw\n\t}\n\tu, err := url.Parse(raw)\n\tif err != nil || u.Scheme != \"https\" || u.Hostname() == \"\" || u.User != nil || u.RawQuery != \"\" || u.Fragment != \"\" || (u.Path != \"\" && u.Path != \"/\") {\n\t\treturn errors.New(\"objectstore: production endpoint must be an HTTPS origin without credentials, path, query, or fragment\")\n\t}\n\treturn nil\n}\n\n// New constructs a MinIO/S3-backed Store. FromEnv adds a live production probe.\nfunc New(cfg Config) (Store, error) {\n\tendpoint := strings.TrimPrefix(strings.TrimPrefix(cfg.Endpoint, \"https://\"), \"http://\")\n\tclient, err := minio.New(endpoint, &minio.Options{\n\t\tCreds:  credentials.NewStaticV4(cfg.AccessKey, cfg.SecretKey, \"\"),\n\t\tSecure: cfg.UseSSL,\n\t\tRegion: cfg.Region,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"objectstore: minio client: %w\", err)\n\t}\n\treturn &minioStore{client: client, bucket: cfg.Bucket}, nil\n}\n","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/objectstore/objectstore.go#L189-L225","documentation":"Error \"objectstore: production endpoint must be an HTTPS origin without credentials, path, query, or fragment\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/objectstore/objectstore.go:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an HTTPS origin without credentials, path, query, or fragment for the production endpoint."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}