chore(poll): return NotModifiedTimeoutErr on 304
This commit is contained in:
parent
35a3c1c23a
commit
bdf9298496
4 changed files with 65 additions and 1 deletions
|
@ -67,7 +67,12 @@ func (c *Client) PollRange(ctx context.Context, b Bucket, pk string, q PollRange
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
switch resp.StatusCode {
|
||||
case http.StatusOK:
|
||||
break
|
||||
case http.StatusNotModified:
|
||||
return nil, NotModifiedTimeoutErr
|
||||
default:
|
||||
return nil, fmt.Errorf("http status code %d: %s", resp.StatusCode, body)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue