mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix: handle file download failure (#132)
* fix: handle file download error * fix: return error on fail to download
This commit is contained in:
parent
c25ba31a70
commit
bcc9fad509
2 changed files with 2 additions and 2 deletions
|
@ -631,7 +631,7 @@ func (r *Release) DownloadTorrentFile(opts map[string]string) (*DownloadTorrentF
|
|||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
log.Error().Stack().Err(err).Msgf("error downloading file from: %v - bad status: %d", r.TorrentURL, resp.StatusCode)
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error downloading torrent (%v) file (%v) from '%v' - status code: %d", r.TorrentName, r.TorrentURL, r.Indexer, resp.StatusCode)
|
||||
}
|
||||
|
||||
// Create tmp file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue