mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
sts: Avoid printing all STS errors (#15065)
Limit printing STS errors to - STS internal error - STS not initialized - STS upstream error
This commit is contained in:
parent
21526efe51
commit
dd53b287f2
@ -48,14 +48,10 @@ func writeSTSErrorResponse(ctx context.Context, w http.ResponseWriter, isErrCode
|
||||
if errCtxt != nil {
|
||||
stsErrorResponse.Error.Message = errCtxt.Error()
|
||||
}
|
||||
var logKind logger.Kind
|
||||
switch errCode {
|
||||
case ErrSTSInternalError, ErrSTSNotInitialized:
|
||||
logKind = logger.Minio
|
||||
default:
|
||||
logKind = logger.All
|
||||
case ErrSTSInternalError, ErrSTSNotInitialized, ErrSTSUpstreamError:
|
||||
logger.LogIf(ctx, errCtxt, logger.Minio)
|
||||
}
|
||||
logger.LogIf(ctx, errCtxt, logKind)
|
||||
encodedErrorResponse := encodeResponse(stsErrorResponse)
|
||||
writeResponse(w, err.HTTPStatusCode, encodedErrorResponse, mimeXML)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user