Fix to use http status const
This commit is contained in:
parent
aa0f9563ac
commit
d6bff26e62
|
@ -93,7 +93,7 @@ func (c *Client) streaming(ctx context.Context, p string, tag string) (chan Even
|
||||||
if err == nil {
|
if err == nil {
|
||||||
req.Header.Set("Authorization", "Bearer "+c.config.AccessToken)
|
req.Header.Set("Authorization", "Bearer "+c.config.AccessToken)
|
||||||
resp, err = c.Do(req)
|
resp, err = c.Do(req)
|
||||||
if resp != nil && resp.StatusCode != 200 {
|
if resp != nil && resp.StatusCode != http.StatusOK {
|
||||||
err = parseAPIError("bad request", resp)
|
err = parseAPIError("bad request", resp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user