mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-21 04:31:25 +00:00
add error to http status?
This commit is contained in:
parent
d036914fcb
commit
a8b8a557f7
2
txt.go
2
txt.go
@ -95,7 +95,7 @@ func fetchImage(id, url string) error {
|
||||
return fmt.Errorf("Error downloading %q: %v", url, err)
|
||||
}
|
||||
if r.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("%q status code: %v", url, r.StatusCode)
|
||||
return fmt.Errorf("Error %q HTTP Status Code: %v", url, r.StatusCode)
|
||||
}
|
||||
defer r.Body.Close()
|
||||
img, err = io.ReadAll(r.Body)
|
||||
|
Loading…
Reference in New Issue
Block a user