From 2fa98b1d6a013e0fda0d810ae9b6cda94b026dfc Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 20 Aug 2019 17:43:15 -1000 Subject: [PATCH] Convert errAuthentication as AccessDenied appropriately (#8105) Fixes #8062 --- cmd/api-errors.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/api-errors.go b/cmd/api-errors.go index a929da94d..cd0deaa96 100644 --- a/cmd/api-errors.go +++ b/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: