Skip to content

Commit

Permalink
StatObject and ListObject call return input/output error in case of p…
Browse files Browse the repository at this point in the history
…ermission denied error. (#1009)

* fixing permission denied error

* fixing permission denied error

* fixing permission denied error

* fixing unit test

* removing error statement form every method

* removing error statement form every method

* removing testing statement

* removing error formation in other places

* removing error formation in other places

* removing error formation in other places

* removing error formation in other places

* removing error formation in other places

* fmt gives error

* fixing fmt lint error

* fixing fmt lint error

* fixing fmt lint error

* changing %v to %w

* removing unnecessary change
  • Loading branch information
Tulsishah authored Mar 14, 2023
1 parent 612ddeb commit 1901dde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/storage/bucket_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (b *bucketHandle) StatObject(ctx context.Context, req *gcs.StatObjectReques
return
}
if err != nil {
err = fmt.Errorf("Error in fetching object attributes: %v", err)
err = fmt.Errorf("Error in fetching object attributes: %w", err)
return
}

Expand Down Expand Up @@ -266,7 +266,7 @@ func (b *bucketHandle) ListObjects(ctx context.Context, req *gcs.ListObjectsRequ
break
}
if err != nil {
err = fmt.Errorf("Error in iterating through objects: %v", err)
err = fmt.Errorf("Error in iterating through objects: %w", err)
return
}

Expand Down

0 comments on commit 1901dde

Please sign in to comment.