Skip to content

Commit c9efc39

Browse files
committed
Replace Forbidden with AccessDenied and link to S3 API error docs
1 parent 2ee64f0 commit c9efc39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

s3secrets-helper/s3/s3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ func (c *Client) Get(key string) ([]byte, error) {
9090
return nil, sentinel.ErrNotFound
9191
}
9292

93+
// Possible values can be found at https://docs.aws.amazon.com/AmazonS3/latest/API/API_Error.html
9394
var apiErr smithy.APIError
9495
if errors.As(err, &apiErr) {
9596
code := apiErr.ErrorCode()
96-
// TODO confirm "Forbidden" is a member of the set of values this can return
97-
if code == "Forbidden" {
97+
if code == "AccessDenied" {
9898
return nil, sentinel.ErrForbidden
9999
}
100100
}

0 commit comments

Comments
 (0)