{"record":{"id":"0d58dad4a171fcb6","repo":"dutchcoders/transfer.sh","slug":"storj-bucket-not-set","errorCode":null,"errorMessage":"storj-bucket not set.","messagePattern":"storj-bucket not set\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cmd.go","lineNumber":516,"sourceCode":"\t\tcase \"gdrive\":\n\t\t\tchunkSize := c.Int(\"gdrive-chunk-size\") * 1024 * 1024\n\n\t\t\tif clientJSONFilepath := c.String(\"gdrive-client-json-filepath\"); clientJSONFilepath == \"\" {\n\t\t\t\treturn errors.New(\"gdrive-client-json-filepath not set.\")\n\t\t\t} else if localConfigPath := c.String(\"gdrive-local-config-path\"); localConfigPath == \"\" {\n\t\t\t\treturn errors.New(\"gdrive-local-config-path not set.\")\n\t\t\t} else if basedir := c.String(\"basedir\"); basedir == \"\" {\n\t\t\t\treturn errors.New(\"basedir not set.\")\n\t\t\t} else if store, err := storage.NewGDriveStorage(c.Context, clientJSONFilepath, localConfigPath, basedir, chunkSize, logger); err != nil {\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tcase \"storj\":\n\t\t\tif access := c.String(\"storj-access\"); access == \"\" {\n\t\t\t\treturn errors.New(\"storj-access not set.\")\n\t\t\t} else if bucket := c.String(\"storj-bucket\"); bucket == \"\" {\n\t\t\t\treturn errors.New(\"storj-bucket not set.\")\n\t\t\t} else if store, err := storage.NewStorjStorage(c.Context, access, bucket, purgeDays, logger); err != nil {\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tcase \"local\":\n\t\t\tif v := c.String(\"basedir\"); v == \"\" {\n\t\t\t\treturn errors.New(\"basedir not set.\")\n\t\t\t} else if store, err := storage.NewLocalStorage(v, logger); err != nil {\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tdefault:\n\t\t\treturn errors.New(\"Provider not set or invalid.\")\n\t\t}\n\n\t\tsrvr, err := server.New(","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/dutchcoders/transfer.sh/blob/c37bfd95797fd6da8a6da53fc13d191994b3f687/cmd/cmd.go#L498-L534","documentation":"Thrown by the transfer.sh CLI when --provider storj is selected and --storj-access is present but --storj-bucket is empty. The bucket names the Storj destination for uploads; without it the storage backend has no target, so startup fails during the ordered flag validation before NewStorjStorage is called.","triggerScenarios":"Running with --provider storj --storj-access X but no --storj-bucket, or a bucket interpolated from an unset/empty variable.","commonSituations":"Access grant configured but the bucket never created/named in the deployment config; per-environment bucket names where the staging value is missing; copying examples that only demonstrate the access flag.","solutions":["Add --storj-bucket <name> to the command line","Create the bucket in Storj first (uplink mb or Satellite UI) so the next step — NewStorjStorage — succeeds","Verify the access grant has permission scope over the named bucket"],"exampleFix":"// before\ntransfer.sh --provider storj --storj-access \"$STORJ_ACCESS\"\n// after\ntransfer.sh --provider storj --storj-access \"$STORJ_ACCESS\" --storj-bucket uploads","handlingStrategy":"validation","validationCode":": \"${STORJ_BUCKET:?storj bucket required}\"\nargs+=(--storj-bucket \"$STORJ_BUCKET\")","typeGuard":null,"tryCatchPattern":"if err := cmd.Root.Execute(); err != nil {\n  if strings.Contains(err.Error(), \"storj-bucket not set\") {\n    log.Fatalf(\"storj provider requires --storj-bucket\")\n  }\n  os.Exit(1)\n}","preventionTips":["Create the bucket (uplink mb) before first launch","Parameterize bucket name per environment with fail-fast env var checks","Confirm the access grant scope covers the bucket"],"tags":["cli","configuration","storj","bucket","startup-validation"],"backgroundTag":"missing-required-flag","analyzedSha":"c37bfd95797fd6da8a6da53fc13d191994b3f687","analyzedAt":"2026-09-05T10:21:07.548Z","contentChangedAt":"2026-09-05T10:21:07.548Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}