{"record":{"id":"69252ec3d6254051","repo":"Tencent/WeKnora","slug":"bucket-q-does-not-exist-69252e","errorCode":null,"errorMessage":"bucket %q does not exist","messagePattern":"bucket %q does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/service/file/s3.go","lineNumber":175,"sourceCode":"\t_, err := s.client.CreateBucket(ctx, &s3.CreateBucketInput{\n\t\tBucket: aws.String(s.bucketName),\n\t})\n\treturn err\n}\n\n// CheckConnectivity verifies S3 is reachable and, if a bucket is configured,\n// that the bucket exists. This is a read-only probe — it never creates a bucket.\nfunc (s *s3FileService) CheckConnectivity(ctx context.Context) error {\n\tcheckCtx, cancel := context.WithTimeout(ctx, 10*time.Second)\n\tdefer cancel()\n\n\tif s.bucketName != \"\" {\n\t\texists, err := s.bucketExists(checkCtx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !exists {\n\t\t\treturn fmt.Errorf(\"bucket %q does not exist\", s.bucketName)\n\t\t}\n\t\treturn nil\n\t}\n\n\t// List buckets to verify connectivity\n\t_, err := s.client.ListBuckets(checkCtx, &s3.ListBucketsInput{})\n\treturn err\n}\n\n// CheckS3Connectivity tests S3 connectivity using the provided credentials.\n// It creates a temporary service instance internally and delegates to CheckConnectivity.\nfunc CheckS3Connectivity(ctx context.Context, endpoint, accessKey, secretKey, bucketName, region string) error {\n\treturn CheckS3ConnectivityWithOptions(ctx, endpoint, accessKey, secretKey, bucketName, region, false)\n}\n\nfunc CheckS3ConnectivityWithOptions(ctx context.Context, endpoint, accessKey, secretKey, bucketName, region string, forcePathStyle bool) error {\n\tsvc, err := newS3Client(endpoint, accessKey, secretKey, bucketName, region, \"\", forcePathStyle)\n\tif err != nil {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/service/file/s3.go#L157-L193","documentation":"S3 read-only connectivity probe: bucketExists succeeded but reported the configured bucket absent, so credentials and endpoint work yet the bucket is misconfigured; the probe never creates buckets and fails with a configuration error.","triggerScenarios":"Thrown at internal/application/service/file/s3.go:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the bucket in S3 or fix the configured bucket name","Verify the credentials can see the target account's buckets","Surface as a configuration error, not a connectivity one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}