{"record":{"id":"6687a68d8372383e","repo":"JuliusBrussee/caveman","slug":"objectstore-s3-endpoint-is-required-in-production","errorCode":null,"errorMessage":"objectstore: S3_ENDPOINT is required in production","messagePattern":"objectstore: S3_ENDPOINT is required in production","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/objectstore/objectstore.go","lineNumber":147,"sourceCode":"\tAccessKey string\n\tSecretKey string\n\tRegion    string\n\tUseSSL    bool\n}\n\n// FromEnv builds a Store from the S3_* environment variables. It returns\n// (nil, nil) when S3_ENDPOINT is unset outside production. Production requires\n// object storage because retention, replay, and artifact offload must not\n// silently disable themselves after launch.\n//\n// Credential vars accept both the repo's names (S3_ACCESS_KEY/S3_SECRET_KEY)\n// and the AWS-conventional names (S3_ACCESS_KEY_ID/S3_SECRET_ACCESS_KEY). TLS is\n// inferred from the endpoint scheme (https) unless S3_USE_SSL forces it.\nfunc FromEnv() (Store, error) {\n\tendpoint := env.String(\"S3_ENDPOINT\", \"\")\n\tif endpoint == \"\" {\n\t\tif env.IsProduction() {\n\t\t\treturn nil, errors.New(\"objectstore: S3_ENDPOINT is required in production\")\n\t\t}\n\t\treturn nil, nil\n\t}\n\tproduction := env.IsProduction()\n\tbucketFallback := \"caveman-local\"\n\tif production {\n\t\tbucketFallback = \"\"\n\t}\n\taccess := env.String(\"S3_ACCESS_KEY\", env.String(\"S3_ACCESS_KEY_ID\", \"\"))\n\tsecret := env.String(\"S3_SECRET_KEY\", env.String(\"S3_SECRET_ACCESS_KEY\", \"\"))\n\tuseSSL := strings.HasPrefix(endpoint, \"https://\") || env.Bool(\"S3_USE_SSL\", false)\n\tcfg := Config{\n\t\tEndpoint:  endpoint,\n\t\tBucket:    env.String(\"S3_BUCKET\", bucketFallback),\n\t\tAccessKey: access,\n\t\tSecretKey: secret,\n\t\tRegion:    env.String(\"S3_REGION\", \"us-east-1\"),\n\t\tUseSSL:    useSSL,","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/objectstore/objectstore.go#L129-L165","documentation":"Error \"objectstore: S3_ENDPOINT is required in production\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/objectstore/objectstore.go:147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set S3_ENDPOINT in production."],"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-15T17:31:12.345Z"}