{"record":{"id":"aac3bd2639cd19e9","repo":"juicedata/juicefs","slug":"storj-access-grant-is-required-pass-via-access","errorCode":null,"errorMessage":"storj: access grant is required (pass via --access-key)","messagePattern":"storj: access grant is required \\(pass via --access-key\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/storj.go","lineNumber":347,"sourceCode":"\t\t\t\tcontinue\n\t\t\t}\n\t\t\tpending = append(pending, &PendingPart{\n\t\t\t\tKey:      item.Key,\n\t\t\t\tUploadID: item.UploadID,\n\t\t\t\tCreated:  item.System.Created,\n\t\t\t})\n\t\t}\n\t\treturn iter.Err()\n\t})\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn pending, \"\", nil\n}\n\nfunc newStorj(endpoint, accessGrant, _, _ string) (ObjectStorage, error) {\n\tif accessGrant == \"\" {\n\t\treturn nil, fmt.Errorf(\"storj: access grant is required (pass via --access-key)\")\n\t}\n\taccess, err := uplink.ParseAccess(accessGrant)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"storj: parse access grant: %w\", err)\n\t}\n\tbucket := strings.Trim(strings.TrimPrefix(endpoint, \"storj://\"), \"/\")\n\tif bucket == \"\" {\n\t\treturn nil, fmt.Errorf(\"storj: bucket name is required (set via --bucket)\")\n\t}\n\n\tcfg := uplink.Config{UserAgent: UserAgent}\n\n\tctx := context.Background()\n\tproject, err := cfg.OpenProject(ctx, access)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"storj: open project: %w\", err)\n\t}\n\treturn &storjClient{project: project, bucket: bucket}, nil","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/storj.go#L329-L365","documentation":"newStorj requires a Storj access grant string but received an empty one. Validation guard: unlike S3-style backends, Storj authenticates with a serialized access grant; it must be supplied via the --access-key option before any bucket operation.","triggerScenarios":"Thrown at pkg/object/storj.go:347 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the Storj access grant via --access-key when creating the storage"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}