You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: [#420] improve error loggin for statistics importer
Now you can see the exact error when the tracker API fails. For example,
the following error when the torrent is not found:
```
2024-01-03T17:25:49.817570509+00:00 [statistics_importer][ERROR] Error updating torrent tracker stats for torrent with id 3; info-hash c0bae61394917c2cc3aa3af9c2291bfe80b5bbf4. Error: TorrentNotFound
```
let ret = self.import_torrent_statistics(torrent.torrent_id,&torrent.info_hash).await;
41
40
42
-
// code-review: should we treat differently for each case?. The
43
-
// tracker API could be temporarily offline, or there could be a
44
-
// tracker misconfiguration.
45
-
//
46
-
// This is the log when the torrent is not found in the tracker:
47
-
//
48
-
// ```
49
-
// 2023-05-09T13:31:24.497465723+00:00 [torrust_index::tracker::statistics_importer][ERROR] Error updating torrent tracker stats for torrent with id 140: TorrentNotFound
50
-
// ```
51
-
52
41
ifletSome(err) = ret.err(){
53
42
let message = format!(
54
43
"Error updating torrent tracker stats for torrent with id {}: {:?}",
0 commit comments