From 7994cb2cf68f8c6cd40873137da48fa815f5321c Mon Sep 17 00:00:00 2001 From: Will Norris Date: Wed, 19 Nov 2014 22:22:21 -0800 Subject: [PATCH] handle error returned when fetching remote images --- imageproxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imageproxy.go b/imageproxy.go index 6430471..55df86a 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -168,6 +168,9 @@ func (t *TransformingTransport) RoundTrip(req *http.Request) (*http.Response, er u := *req.URL u.Fragment = "" resp, err := t.Client.Get(u.String()) + if err != nil { + return nil, err + } defer resp.Body.Close() b, err := ioutil.ReadAll(resp.Body)