mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Handling unhandled errors in the InfoCannedPolicy method. (#10575)
This commit is contained in:
parent
511424a287
commit
27d9bd04e5
@ -722,7 +722,10 @@ func (a adminAPIHandlers) InfoCannedPolicy(w http.ResponseWriter, r *http.Reques
|
||||
return
|
||||
}
|
||||
|
||||
json.NewEncoder(w).Encode(policy)
|
||||
if err = json.NewEncoder(w).Encode(policy); err != nil {
|
||||
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
|
||||
return
|
||||
}
|
||||
w.(http.Flusher).Flush()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user