mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
I'm an idiot
This commit is contained in:
parent
6d0ee9c0c9
commit
2b0078c8f2
2 changed files with 1 additions and 2 deletions
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
func (a *api) upsertAccountHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
acct := &data.Account{}
|
||||
if err := json.NewDecoder(r.Body).Decode(a); err != nil {
|
||||
if err := json.NewDecoder(r.Body).Decode(acct); err != nil {
|
||||
a.logger.WithFields(logrus.Fields{
|
||||
"err": err,
|
||||
}).Info("failed to parse request json")
|
||||
|
|
|
@ -117,7 +117,6 @@ func (rac *AuthenticatedClient) request(r *Request) ([]byte, error) {
|
|||
}
|
||||
if resp.StatusCode != 200 {
|
||||
rac.statsd.Incr("reddit.api.errors", r.tags, 0.1)
|
||||
fmt.Println(string(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