{"record":{"id":"e4d79640320a336f","repo":"benbjohnson/litestream","slug":"abs-container-name-is-required","errorCode":null,"errorMessage":"abs: container name is required","messagePattern":"abs: container name is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"abs/replica_client.go","lineNumber":110,"sourceCode":"}\n\n// Type returns \"abs\" as the client type.\nfunc (c *ReplicaClient) Type() string {\n\treturn ReplicaClientType\n}\n\n// Init initializes the connection to Azure. No-op if already initialized.\nfunc (c *ReplicaClient) Init(ctx context.Context) (err error) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\n\tif c.client != nil {\n\t\treturn nil\n\t}\n\n\t// Validate required configuration\n\tif c.Bucket == \"\" {\n\t\treturn fmt.Errorf(\"abs: container name is required\")\n\t}\n\n\t// Construct & parse endpoint unless already set.\n\tendpoint := c.Endpoint\n\tif endpoint == \"\" {\n\t\tif c.AccountName == \"\" {\n\t\t\treturn fmt.Errorf(\"abs: account name is required when endpoint is not specified\")\n\t\t}\n\t\tendpoint = fmt.Sprintf(\"https://%s.blob.core.windows.net\", c.AccountName)\n\t}\n\n\t// Configure client options with retry policy\n\tclientOptions := &azblob.ClientOptions{\n\t\tClientOptions: azcore.ClientOptions{\n\t\t\tRetry: policy.RetryOptions{\n\t\t\t\tMaxRetries:    10,\n\t\t\t\tRetryDelay:    time.Second,\n\t\t\t\tMaxRetryDelay: 30 * time.Second,","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/benbjohnson/litestream/blob/4ed7a308f6271ebfd2b0a6e4b70b03011a37e4a3/abs/replica_client.go#L92-L128","documentation":"ReplicaClient.Init validates required ABS configuration before constructing the Azure blob client; the Bucket field holds the Azure container name. An empty Bucket means no container was configured, so the client cannot address any storage and Init fails with this error.","triggerScenarios":"Calling Init on an abs.ReplicaClient whose Bucket field is empty — e.g. a YAML config block for the ABS replica that lacks the 'bucket' key, or a client constructed programmatically without setting Bucket.","commonSituations":"Config file missing the bucket/container field for the abs replica; renaming the key in YAML so litestream reads an empty value; building the client in code and forgetting client.Bucket = ... before Init.","solutions":["Set the container name: either add bucket: mycontainer to the abs replica config block or set client.Bucket before Init","Re-run litestream with the corrected config and confirm via logs that Init succeeds","Validate the parsed ReplicaClient struct (Bucket != \"\") in tests/automation before calling Init"],"exampleFix":"// before (config)\nreplica:\n  type: abs\n  account-name: myaccount\n// after\nreplica:\n  type: abs\n  bucket: mycontainer\n  account-name: myaccount","handlingStrategy":"validation","validationCode":"if c.Bucket == \"\" {\n    return errors.New(\"abs replica config missing bucket (container) before Init\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set bucket in the abs replica config block","Add a startup config validation step asserting required fields","After YAML edits, verify the parsed struct (not just the file) has Bucket populated"],"tags":["abs","azure","configuration","container"],"backgroundTag":"missing-required-argument","analyzedSha":"4ed7a308f6271ebfd2b0a6e4b70b03011a37e4a3","analyzedAt":"2026-09-06T18:29:25.564Z","contentChangedAt":"2026-09-06T18:29:25.564Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}