fix: translate tier add errors properly (#16191)

This commit is contained in:
Harshavardhana
2022-12-08 11:18:07 -08:00
committed by GitHub
parent 3eb2d086b2
commit 4bc367c490
3 changed files with 29 additions and 27 deletions

View File

@@ -100,6 +100,7 @@ func (api adminAPIHandlers) AddTierHandler(w http.ResponseWriter, r *http.Reques
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, errTierReservedName), r.URL)
return
}
// Refresh from the disk in case we had missed notifications about edits from peers.
if err := globalTierConfigMgr.Reload(ctx, objAPI); err != nil {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)