Skip to content

Commit

Permalink
fix: update not found bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryTong65 committed Jan 14, 2025
1 parent 415131c commit a669592
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/gnfd/gnfd_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ func (g *Gnfd) QueryBucketInfo(ctx context.Context, bucket string) (bucketInfo *
resp, err := client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucket})
if err != nil {
log.CtxErrorw(ctx, "failed to query bucket", "bucket_name", bucket, "error", err)
if strings.Contains(err.Error(), "No such bucket") {
return nil, ErrNoSuchBucket
}
return nil, err
}
return resp.GetBucketInfo(), nil
Expand Down

0 comments on commit a669592

Please sign in to comment.