simplify probe APIs

This commit is contained in:
Anand Babu (AB) Periasamy
2015-08-18 19:30:17 -07:00
parent 76d11ed1e4
commit cdf93e534c
11 changed files with 104 additions and 119 deletions

View File

@@ -60,8 +60,8 @@ func NewRequest(url string, op RPCOps, transport http.RoundTripper) (*RPCRequest
func (r RPCRequest) Do() (*http.Response, *probe.Error) {
resp, err := r.transport.RoundTrip(r.req)
if err != nil {
if werr, ok := probe.ToWrappedError(err); ok {
return nil, werr.ToError().Trace()
if err, ok := probe.UnwrapError(err); ok {
return nil, err.Trace()
}
return nil, probe.NewError(err)
}