mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
Add some debugging
This commit is contained in:
parent
d2909b8003
commit
c2e3b81830
2 changed files with 2 additions and 3 deletions
|
@ -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"))
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue