Convert errAuthentication as AccessDenied appropriately (#8105)

Fixes #8062
master
Harshavardhana 5 years ago committed by Nitish Tiwari
parent 99a4298938
commit 2fa98b1d6a
  1. 2
      cmd/api-errors.go

@ -1526,6 +1526,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) {
apiErr = ErrEntityTooLarge
case errDataTooSmall:
apiErr = ErrEntityTooSmall
case errAuthentication:
apiErr = ErrAccessDenied
case auth.ErrInvalidAccessKeyLength:
apiErr = ErrAdminInvalidAccessKey
case auth.ErrInvalidSecretKeyLength:

Loading…
Cancel
Save