diff options
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/media.go')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/media.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/media.go b/vendor/github.com/Rhymen/go-whatsapp/media.go index 1bf729bb..b15b9ae2 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/media.go +++ b/vendor/github.com/Rhymen/go-whatsapp/media.go @@ -74,6 +74,12 @@ func downloadMedia(url string) (file []byte, mac []byte, err error) { return nil, nil, err } if resp.StatusCode != 200 { + if resp.StatusCode == 404 { + return nil, nil, ErrMediaDownloadFailedWith404 + } + if resp.StatusCode == 410 { + return nil, nil, ErrMediaDownloadFailedWith410 + } return nil, nil, fmt.Errorf("download failed with status code %d", resp.StatusCode) } defer resp.Body.Close() |