diff --git a/ct/client/logclient.go b/ct/client/logclient.go index 2b18acf..d63fe15 100644 --- a/ct/client/logclient.go +++ b/ct/client/logclient.go @@ -106,6 +106,9 @@ func (c *LogClient) fetchAndParse(uri string, res interface{}) error { if err != nil { return err } + if resp.StatusCode / 100 != 2 { + return fmt.Errorf("GET %s: %s (%s)", uri, resp.Status, string(body)) + } if err = json.Unmarshal(body, &res); err != nil { return err }