mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Convert errAuthentication as AccessDenied appropriately (#8105)
Fixes #8062
This commit is contained in:
parent
99a4298938
commit
2fa98b1d6a
@ -1526,6 +1526,8 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) {
|
|||||||
apiErr = ErrEntityTooLarge
|
apiErr = ErrEntityTooLarge
|
||||||
case errDataTooSmall:
|
case errDataTooSmall:
|
||||||
apiErr = ErrEntityTooSmall
|
apiErr = ErrEntityTooSmall
|
||||||
|
case errAuthentication:
|
||||||
|
apiErr = ErrAccessDenied
|
||||||
case auth.ErrInvalidAccessKeyLength:
|
case auth.ErrInvalidAccessKeyLength:
|
||||||
apiErr = ErrAdminInvalidAccessKey
|
apiErr = ErrAdminInvalidAccessKey
|
||||||
case auth.ErrInvalidSecretKeyLength:
|
case auth.ErrInvalidSecretKeyLength:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user