}
defer res.Body.Close()
+ if res.StatusCode >= 400 {
+ data, _ := ioutil.ReadAll(r.Body)
+ log.Errorf(ctx, "creating subscription failed: status %d %q", res.StatusCode, data)
+ return fmt.Errorf("creating subscription failed")
+ }
+
redirectURL := r.URL
redirectURL.Path = "/"
redirectURL.RawQuery = ""