Fix to use http status const
This commit is contained in:
parent
aa0f9563ac
commit
d6bff26e62
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue