remove panic

This commit is contained in:
holooooo 2021-05-24 15:17:02 +08:00
parent 5f5afc111a
commit 00b6c32dc2
2 changed files with 2 additions and 2 deletions

View File

@ -246,7 +246,7 @@ func TestOption_WithRetry(t *testing.T) {
}
retryAmount := 1
retryDelay := 1400 * time.Millisecond
retryDelay := 200 * time.Millisecond
startTime := time.Now().UnixNano() / int64(time.Millisecond)
_ = client.Get(nil, "", WithRetry(retryAmount, retryDelay))

View File

@ -640,7 +640,7 @@ func (b *BeegoHTTPRequest) ToXML(v interface{}) error {
return err
}
if err := xrv.Validate(bytes.NewReader(data)); err != nil {
panic(err)
return err
}
return berror.Wrap(xml.Unmarshal(data, v),