mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: STS error translation to API error (#16683)
This commit is contained in:
parent
8bfe972bab
commit
59a5456091
@ -33,7 +33,7 @@ func writeSTSErrorResponse(ctx context.Context, w http.ResponseWriter, isErrCode
|
|||||||
err = stsErrCodes.ToSTSErr(errCode)
|
err = stsErrCodes.ToSTSErr(errCode)
|
||||||
}
|
}
|
||||||
if err.Code == "InternalError" || !isErrCodeSTS {
|
if err.Code == "InternalError" || !isErrCodeSTS {
|
||||||
aerr := getAPIError(APIErrorCode(errCode))
|
aerr := errorCodes.ToAPIErr(toAPIErrorCode(ctx, errCtxt))
|
||||||
if aerr.Code != "InternalError" {
|
if aerr.Code != "InternalError" {
|
||||||
err.Code = aerr.Code
|
err.Code = aerr.Code
|
||||||
err.Description = aerr.Description
|
err.Description = aerr.Description
|
||||||
|
Loading…
Reference in New Issue
Block a user