diff --git a/client/httplib/client_option_test.go b/client/httplib/client_option_test.go index 5b1420d7..fd7ba7df 100644 --- a/client/httplib/client_option_test.go +++ b/client/httplib/client_option_test.go @@ -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)) diff --git a/client/httplib/httplib.go b/client/httplib/httplib.go index ec6c2013..be4f388e 100644 --- a/client/httplib/httplib.go +++ b/client/httplib/httplib.go @@ -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),