mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
return appropriate errors upon parseErrors (#13831)
This commit is contained in:
@@ -535,7 +535,7 @@ func (l *ObjectLegalHold) IsEmpty() bool {
|
||||
func ParseObjectLegalHold(reader io.Reader) (hold *ObjectLegalHold, err error) {
|
||||
hold = &ObjectLegalHold{}
|
||||
if err = xml.NewDecoder(reader).Decode(hold); err != nil {
|
||||
return
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !hold.Status.Valid() {
|
||||
|
||||
Reference in New Issue
Block a user