Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro (Ale) Segala <[email protected]>
  • Loading branch information
ItalyPaleAle authored Nov 10, 2023
1 parent b78f95a commit 13779ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bindings/gcp/bucket/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (g *GCPStorage) get(ctx context.Context, req *bindings.InvokeRequest) (*bin
if err != nil {
var apiErr *googleapi.Error
if errors.As(err, &apiErr) && apiErr.Code == http.StatusNotFound {
return nil, fmt.Errorf("object not found: %s", key)
return nil, errors.New("object not found")
}

return nil, fmt.Errorf("gcp bucketgcp bucket binding error: error downloading bucket object: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion bindings/huawei/obs/obs.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (o *HuaweiOBS) get(ctx context.Context, req *bindings.InvokeRequest) (*bind
if err != nil {
var obsErr obs.ObsError
if errors.As(err, &obsErr) && obsErr.StatusCode == http.StatusNotFound {
return nil, fmt.Errorf("object not found: %s", key)
return nil, errors.New("object not found")
}
return nil, fmt.Errorf("obs binding error. error getting obs object: %w", err)
}
Expand Down

0 comments on commit 13779ba

Please sign in to comment.