mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(indexers): API get torrent check for nil body (#1146)
This commit is contained in:
parent
657c966ecb
commit
a78a5d1bf8
1 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,10 @@ func (s *apiService) GetTorrentByID(ctx context.Context, indexer string, torrent
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if torrent == nil {
|
||||
return nil, errors.New("could not get torrent: %s from: %s", torrentID, indexer)
|
||||
}
|
||||
|
||||
s.log.Trace().Str("method", "GetTorrentByID").Msgf("%s api successfully fetched torrent: %+v", indexer, torrent)
|
||||
|
||||
return torrent, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue