remove panic
This commit is contained in:
parent
5f5afc111a
commit
00b6c32dc2
@ -246,7 +246,7 @@ func TestOption_WithRetry(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
retryAmount := 1
|
retryAmount := 1
|
||||||
retryDelay := 1400 * time.Millisecond
|
retryDelay := 200 * time.Millisecond
|
||||||
startTime := time.Now().UnixNano() / int64(time.Millisecond)
|
startTime := time.Now().UnixNano() / int64(time.Millisecond)
|
||||||
|
|
||||||
_ = client.Get(nil, "", WithRetry(retryAmount, retryDelay))
|
_ = client.Get(nil, "", WithRetry(retryAmount, retryDelay))
|
||||||
|
|||||||
@ -640,7 +640,7 @@ func (b *BeegoHTTPRequest) ToXML(v interface{}) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := xrv.Validate(bytes.NewReader(data)); err != nil {
|
if err := xrv.Validate(bytes.NewReader(data)); err != nil {
|
||||||
panic(err)
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return berror.Wrap(xml.Unmarshal(data, v),
|
return berror.Wrap(xml.Unmarshal(data, v),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user