Skip to content

Commit

Permalink
return actual res instead nil (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesoreyeram authored Nov 6, 2023
1 parent ebfab9f commit d6472b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experimental/errorsource/error_source_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func RoundTripper(_ httpclient.Options, next http.RoundTripper) http.RoundTrippe
if err == nil {
err = errors.New(res.Status)
}
return nil, Error{source: errorSource, err: err}
return res, Error{source: errorSource, err: err}
}
if errors.Is(err, syscall.ECONNREFUSED) {
return nil, Error{source: backend.ErrorSourceDownstream, err: err}
return res, Error{source: backend.ErrorSourceDownstream, err: err}
}
return res, err
})
Expand Down

0 comments on commit d6472b8

Please sign in to comment.