SetError not implemented properly
fgblomqvist opened this issue · comments
When using this gock:
gock.New("http://www.google.com"). Get("/").Reply(500).SetError(errors.New("Internal Server Error"))
The following line is printed:
2016/04/18 12:14:03 RoundTripper returned a response & error; ignoring response
I'm guessing the RoundTripper is supposed to return a nil response when the error is set? Or I am supposed to set it to nil somehow?
That case should be mitigated. Will fix it in asap. Thanks for reporting.
Fixed. Try updating the package:
go get -u gopkg.in/h2non/gock.v1