Integration Tests for Get config (#1966)

This commit is contained in:
adfost
2022-05-11 22:06:19 -07:00
committed by GitHub
parent d1f67ea7ac
commit 117da114dc
2 changed files with 58 additions and 9 deletions

View File

@@ -147,7 +147,12 @@ func getConfigResponse(session *models.Principal, params cfgApi.ConfigInfoParams
configkv, err := getConfig(ctx, adminClient, params.Name)
if err != nil {
return nil, ErrorWithContext(ctx, err)
errorVal := ErrorWithContext(ctx, err)
minioError := madmin.ToErrorResponse(err)
if minioError.Code == "XMinioConfigError" {
errorVal.Code = 404
}
return nil, errorVal
}
configurationObj := &models.Configuration{
Name: params.Name,