Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit 6e3fdda

Browse files
committed
Update StatusCode check
1 parent 5170895 commit 6e3fdda

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ func (c *Client) Store(req Request, dest string) error {
9595
}
9696
defer resp.Body.Close()
9797

98-
// Check for 2XX Status Codes
99-
if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices {
98+
if resp.StatusCode != http.StatusOK {
10099
return errors.New("failed to generate the result PDF")
101100
}
102101
return writeNewFile(dest, resp.Body)

0 commit comments

Comments
 (0)