{"record":{"id":"0f1ad8e68755f031","repo":"juicedata/juicefs","slug":"storj-parse-access-grant-w","errorCode":null,"errorMessage":"storj: parse access grant: %w","messagePattern":"storj: parse access grant: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/storj.go","lineNumber":351,"sourceCode":"\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\n}\n\nfunc init() {\n\tRegister(\"storj\", newStorj)","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/storj.go#L333-L369","documentation":"Returned by newStorj when uplink.ParseAccess rejects the supplied access grant — the string is not a valid serialized Storj access grant (truncated, wrong encoding, or from an incompatible uplink version).","triggerScenarios":"Thrown at pkg/object/storj.go:351 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the access grant in the Storj console/uplink CLI and paste it fully"],"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"}