fix: simplify usage calculation and progress (#14086)

This commit is contained in:
Harshavardhana
2022-01-11 18:48:43 -08:00
committed by GitHub
parent 404b05a44c
commit d50442da01
5 changed files with 605 additions and 96 deletions

View File

@@ -88,6 +88,12 @@ func toAdminAPIErr(ctx context.Context, err error) APIError {
}
case SRError:
apiErr = errorCodes.ToAPIErrWithErr(e.Code, e.Cause)
case decomError:
apiErr = APIError{
Code: "XMinioDecommissionNotAllowed",
Description: e.Err,
HTTPStatusCode: http.StatusBadRequest,
}
default:
switch {
case errors.Is(err, errDecommissionAlreadyRunning):