Skip to content

Commit

Permalink
Improved error handling in MiraRequest()
Browse files Browse the repository at this point in the history
  • Loading branch information
thecsw committed Jul 15, 2019
1 parent e93621c commit 453f457
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ func (c *Reddit) MiraRequest(method string, target string, payload map[string]st
}
values = values[:len(values)-1]
r, err := http.NewRequest(method, target+values, nil)
if err != nil {
return nil, err
}
r.Header.Set("User-Agent", c.Creds.UserAgent)
r.Header.Set("Authorization", "Bearer "+c.Token)
response, err := c.Client.Do(r)
Expand Down

0 comments on commit 453f457

Please sign in to comment.