diff --git a/internal/cmd/api.go b/internal/cmd/api.go index 42761ec..a7b4d47 100644 --- a/internal/cmd/api.go +++ b/internal/cmd/api.go @@ -19,7 +19,7 @@ func APICmd(ctx context.Context) *cobra.Command { Args: cobra.ExactArgs(0), Short: "Runs the RESTful API.", RunE: func(cmd *cobra.Command, args []string) error { - port = 400 + port = 4000 if os.Getenv("PORT") != "" { port, _ = strconv.Atoi(os.Getenv("PORT")) } diff --git a/internal/reddit/client.go b/internal/reddit/client.go index c9d7b4f..52dfe9c 100644 --- a/internal/reddit/client.go +++ b/internal/reddit/client.go @@ -115,10 +115,9 @@ func (rac *AuthenticatedClient) request(r *Request) ([]byte, error) { rac.statsd.Incr("reddit.api.errors", r.tags, 0.1) return nil, err } - if resp.StatusCode != 200 { rac.statsd.Incr("reddit.api.errors", r.tags, 0.1) - + fmt.Println(bb) // TODO remove // Try to parse a json error. Otherwise we generate a generic one rerr := &Error{} if jerr := json.Unmarshal(bb, rerr); jerr != nil {