{"record":{"id":"b89d90f3f7348d61","repo":"dgraph-io/dgraph","slug":"s-s-b89d90","errorCode":null,"errorMessage":"%s: %s","messagePattern":"%s: %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"graphql/admin/list_backups.go","lineNumber":138,"sourceCode":"\tif err != nil {\n\t\treturn resolve.EmptyResult(q, err)\n\t}\n\n\tfilter, err := buildBackupDateFilter(input)\n\tif err != nil {\n\t\treturn resolve.EmptyResult(q, err)\n\t}\n\n\tcreds := &x.MinioCredentials{\n\t\tAccessKey:    input.AccessKey,\n\t\tSecretKey:    input.SecretKey,\n\t\tSessionToken: input.SessionToken,\n\t\tAnonymous:    input.Anonymous,\n\t}\n\tmanifests, err := worker.ProcessListBackups(ctx, input.Location, creds,\n\t\tneedsFullManifest(input.FullManifest, q.SelectionSet()))\n\tif err != nil {\n\t\treturn resolve.EmptyResult(q, errors.Errorf(\"%s: %s\", x.Error, err.Error()))\n\t}\n\tmanifests = worker.FilterManifestsByDate(manifests, filter)\n\n\tconvertedManifests := convertManifests(manifests)\n\n\tresults := make([]map[string]interface{}, 0)\n\tfor _, m := range convertedManifests {\n\t\tb, err := json.Marshal(m)\n\t\tif err != nil {\n\t\t\treturn resolve.EmptyResult(q, err)\n\t\t}\n\t\tvar result map[string]interface{}\n\t\terr = schema.Unmarshal(b, &result)\n\t\tif err != nil {\n\t\t\treturn resolve.EmptyResult(q, err)\n\t\t}\n\t\tresults = append(results, result)\n\t}","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/graphql/admin/list_backups.go#L120-L156","documentation":"resolveListBackups wraps any failure from worker.ProcessListBackups (the underlying backup listing call) into a uniform '<x.Error>: <detail>' message and returns an empty GraphQL result. The prefix comes from the shared x.Error constant, and the suffix is the raw error from the backup-locating backend (S3, Minio, filesystem, Azure, GCS). It signals the backup listing itself failed — not a date-filter or conversion problem.","triggerScenarios":"Running the admin listBackups GraphQL operation when the underlying worker cannot read the backup location: bad/missing S3 credentials or region, nonexistent bucket/path, network failure to object storage, or the location URI scheme is unsupported.","commonSituations":"Misconfigured access keys or IAM policy lacking s3:ListBucket, typos in the s3:// location string, unreachable Minio endpoint, or credentials passed via sessionToken/anonymous flags that the backend rejects. Also common after rotating cloud credentials without restarting Dgraph.","solutions":["Read the suffix after the colon: it names the real backend error (e.g. AccessDenied, NoSuchBucket) and fix that underlying issue first.","Verify the location URI and that the bucket/container actually exists and is reachable from the Dgraph Alpha.","Check credentials: access keys, session token, anonymous flag, or instance IAM role; test with aws s3 ls or equivalent from the same host.","Confirm network/DNS/firewall access from the Alpha node to the object storage endpoint.","Retry the GraphQL operation once the backend issue is fixed; nothing in the GraphQL layer itself needs changing."],"exampleFix":"// before: wrong location\n{ listBackups(input: { location: \"s3://my-backups/\", accessKey: \"AKIA...\", secretKey: \"...\" }) }\n// after: verified bucket + valid creds\n{ listBackups(input: { location: \"s3://my-backups/dgraph\", accessKey: \"AKIA...\", secretKey: \"...\", region: \"us-east-1\" }) }","handlingStrategy":"try-catch","validationCode":"// Pre-flight: verify location and creds from the client before listing\nconst loc = 's3://my-bucket/dgraph';\nif (!/^([a-z0-9]+:\\/\\/.+)$/.test(loc)) throw new Error('unsupported backup location URI');\n// ensure keys are set when not using instance IAM role\nif (!accessKey || !secretKey) throw new Error('missing backup credentials');","typeGuard":null,"tryCatchPattern":"try {\n  const res = await gql(listBackupsQuery);\n} catch (e) {\n  const detail = e.message.split(': ').slice(1).join(': '); // backend error after x.Error prefix\n  if (/AccessDenied|InvalidAccessKeyId/.test(detail)) rotateCredentialsAndRetry();\n  else if (/NoSuchBucket|not found/.test(detail)) fixLocationAndRetry();\n  else throw e;\n}","preventionTips":["Test bucket reachability and credentials with aws s3 ls / az / gsutil from the Alpha host","Include region in listBackups input for S3 locations","Verify the location URI scheme is one Dgraph supports (s3, minio, gcs, azure, file)","Keep an eye on credential rotation; restart/reconfigure Alphas after key changes","Check network/DNS from inside the cluster (K8s NetworkPolicies often block object storage)"],"tags":["graphql","backups","s3","storage","admin-api"],"backgroundTag":"backup-list-failed","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}