Skip to content

Commit

Permalink
fix: handle http error better
Browse files Browse the repository at this point in the history
  • Loading branch information
pviotti committed Mar 10, 2024
1 parent 98913d3 commit f2c9adb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func main() {
fmt.Printf("Error fetching data from Pocket: %v\n", err)
return
}
if resp.StatusCode != 200 {
fmt.Printf("Error fetching data from Pocket: %v\n", resp.Status)
return
}
defer resp.Body.Close()
// bodyBytes, err := io.ReadAll(resp.Body)
// if err != nil {
Expand Down

0 comments on commit f2c9adb

Please sign in to comment.