[PTP] Missing torrents return 500 instead of 404 #1257

Open
opened 2026-02-20 10:09:01 -05:00 by deekerman · 0 comments
Owner

Originally created by @nonamethanks on GitHub (Nov 25, 2025).

I attest that there is not an existing issue for this?

  • I have searched the existing open and closed issues
  • I confirm this is not related to a Cardigann YML Indexer

Current Behavior

With PTP, if a torrent is provided to Radarr but is removed before it's snatched, Prowlarr will start returning status code 500 (instead of 404).

These are the logs on Radarr's side, as you can see Prowlarr is responding with a 500.

2025-11-24 17:20:43.6|Info|RssSyncService|RSS Sync Completed. Reports found: 51, Reports grabbed: 0
2025-11-24 17:30:48.9|Info|RssSyncService|Starting RSS Sync
2025-11-24 17:30:49.2|Info|DownloadDecisionMaker|Processing 51 releases
2025-11-24 17:30:57.2|Warn|HttpClient|HTTP Error - Res: HTTP/1.1 [GET] http://prowlarr:9696/4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD: 500.InternalServerError (143 bytes)
<?xml version="1.0" encoding="UTF-8"?>
<error code="500" description="Invalid torrent file contents. Reason: Invalid torrent file specified" />
2025-11-24 17:30:57.2|Info|RTorrent|Request for rutorrent_3 failed with exception 'HTTP request failed: [500:InternalServerError] [GET] at [http://prowlarr:9696/4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD]'. Retrying in 3.9621371s.

[v6.0.4.10291] NzbDrone.Common.Http.HttpException: HTTP request failed: [500:InternalServerError] [GET] at [http://prowlarr:9696/4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD]
   at NzbDrone.Common.Http.HttpClient.ExecuteAsync(HttpRequest request) in ./NzbDrone.Common/Http/HttpClient.cs:line 119
   at NzbDrone.Core.Download.TorrentClientBase`1.<>c.<<DownloadFromWebUrl>b__11_0>d.MoveNext() in ./NzbDrone.Core/Download/TorrentClientBase.cs:line 143
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.<>c__9`2.<<ExecuteAsync>b__9_0>d.MoveNext()
<?xml version="1.0" encoding="UTF-8"?>
<error code="500" description="Invalid torrent file contents. Reason: Invalid torrent file specified" />

Expected Behavior

An attempt at downloading a torrent that was removed from PTP should return 404.

Steps To Reproduce

No response

Environment

- OS: Linux
- Prowlarr: 2.3.0.5236
- Docker Install: Yes

What branch are you running?

Master

Trace Logs?

As you can see from the trace logs below, PTP responds with a HTML page for this torrent. I guess the problem is that the HTML page returns a 200 because it redirects to the deletion log.


2025-11-25 13:35:56.2|Trace|Http|Req: 116051 [GET] /4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD (from 172.18.0.11 curl/8.14.1)
2025-11-25 13:35:56.2|Trace|DownloadService|Attempting download of https://passthepopcorn.me/torrents.php?action=download&id=(removed)
2025-11-25 13:35:56.2|Trace|IndexerHttpClient|Req: [GET] https://passthepopcorn.me/torrents.php?action=download&id=(removed)
2025-11-25 13:35:56.2|Trace|ConfigService|Using default config value for 'proxyenabled' defaultValue:'False'
2025-11-25 13:35:56.3|Trace|IndexerHttpClient|Res: HTTP/1.1 [GET] https://passthepopcorn.me/torrents.php?action=download&id=(removed) 302.Found (0 bytes) (125 ms)
2025-11-25 13:35:56.3|Debug|PassThePopcorn|Download request is being redirected to: https://passthepopcorn.me/log.php?search=1466727
2025-11-25 13:35:56.3|Trace|RateLimitService|Rate Limit triggered, delaying 'passthepopcorn.me' for 3.874 sec
2025-11-25 13:36:00.2|Trace|IndexerHttpClient|Req: [GET] https://passthepopcorn.me/log.php?search=1466727
2025-11-25 13:36:00.2|Trace|ConfigService|Using default config value for 'proxyenabled' defaultValue:'False'
2025-11-25 13:36:00.3|Trace|Http|Res: 115995 [GET] /signalr/messages?access_token=(removed)&id=(removed) 101.SwitchingProtocols (154176 ms)
2025-11-25 13:36:00.4|Trace|Http|Req: 116052 [GET] /system/logs/files (from 172.*.*.195 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0)
2025-11-25 13:36:00.4|Debug|Prowlarr.Http.Authentication.NoAuthenticationHandler|AuthenticationScheme: External was successfully authenticated.
2025-11-25 13:36:00.4|Trace|Http|Res: 116052 [GET] /system/logs/files: 200.OK (0 ms)
2025-11-25 13:36:00.4|Trace|Http|Req: 116053 [POST] /signalr/messages/negotiate?access_token=(removed)&negotiateVersion=1 (from 172.*.*.195 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0)
2025-11-25 13:36:00.4|Trace|Http|Res: 116053 [POST] /signalr/messages/negotiate?access_token=(removed)&negotiateVersion=1: 200.OK (11 ms)
2025-11-25 13:36:00.5|Trace|IndexerHttpClient|Res: HTTP/1.1 [GET] https://passthepopcorn.me/log.php?search=1466727: 200.OK (13534 bytes) (316 ms)
2025-11-25 13:36:00.5|Debug|PassThePopcorn|Downloaded for release finished (13534 bytes from https://passthepopcorn.me/torrents.php?action=download&id=(removed)
2025-11-25 13:36:00.5|Debug|PassThePopcorn|Invalid torrent file contents: <!DOCTYPE html>
<html>
<head>

(i removed all the HTML content here, it was a raw HTML page)

</body>
</html>

2025-11-25 13:36:00.9|Trace|Http|Req: 116054 [GET] /initialize.json?t=1764074160403 (from 172.*.*.195 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0)
2025-11-25 13:36:00.9|Debug|Prowlarr.Http.Authentication.NoAuthenticationHandler|AuthenticationScheme: External was successfully authenticated.
2025-11-25 13:36:00.9|Trace|Http|Res: 116054 [GET] /initialize.json?t=1764074160403: 200.OK (0 ms)
2025-11-25 13:36:00.5|Error|NewznabController|System.NotSupportedException: Invalid torrent file contents. Reason: Invalid torrent file specified

[v2.3.0.5236] System.NotSupportedException: Invalid torrent file contents. Reason: Invalid torrent file specified
 ---> MonoTorrent.TorrentException: Invalid torrent file specified
 ---> MonoTorrent.BEncoding.BEncodingException: Invalid data found. Aborting
   at MonoTorrent.BEncoding.BEncodeDecoder.DecodeTorrent(RawReader reader)
   at MonoTorrent.Torrent.Load(Stream stream, String path)
   --- End of inner exception stack trace ---
   at MonoTorrent.Torrent.Load(Stream stream, String path)
   at MonoTorrent.Torrent.Load(Byte[] data)
   at NzbDrone.Core.Indexers.TorrentIndexerBase`1.ValidateDownloadData(Byte[] fileData) in ./NzbDrone.Core/Indexers/TorrentIndexerBase.cs:line 24
   --- End of inner exception stack trace ---
   at NzbDrone.Core.Indexers.TorrentIndexerBase`1.ValidateDownloadData(Byte[] fileData) in ./NzbDrone.Core/Indexers/TorrentIndexerBase.cs:line 29
   at NzbDrone.Core.Indexers.HttpIndexerBase`1.Download(Uri link) in ./NzbDrone.Core/Indexers/HttpIndexerBase.cs:line 327
   at NzbDrone.Core.Download.DownloadService.DownloadReport(String link, Int32 indexerId, String source, String host, String title) in ./NzbDrone.Core/Download/DownloadService.cs:line 151
   at NzbDrone.Api.V1.Indexers.NewznabController.GetDownload(Int32 id, String link, String file) in ./Prowlarr.Api.V1/Indexers/NewznabController.cs:line 276


2025-11-25 13:36:00.9|Trace|Http|Res: 116051 [GET] /4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD: 500.InternalServerError (4766 ms)

I attest that Trace Logs have been provided as applicable. Reports will be closed if the required logs are not provided.

  • I attest that I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain trace - that are relevant and show this issue.
Originally created by @nonamethanks on GitHub (Nov 25, 2025). ### I attest that there is not an existing issue for this? - [x] I have searched the existing open and closed issues ### I attest this is not related to a Cardigann YML Indexer. - [x] I confirm this is not related to a Cardigann YML Indexer ### Current Behavior With PTP, if a torrent is provided to Radarr but is removed before it's snatched, Prowlarr will start returning status code 500 (instead of 404). These are the logs on Radarr's side, as you can see Prowlarr is responding with a 500. ``` 2025-11-24 17:20:43.6|Info|RssSyncService|RSS Sync Completed. Reports found: 51, Reports grabbed: 0 2025-11-24 17:30:48.9|Info|RssSyncService|Starting RSS Sync 2025-11-24 17:30:49.2|Info|DownloadDecisionMaker|Processing 51 releases 2025-11-24 17:30:57.2|Warn|HttpClient|HTTP Error - Res: HTTP/1.1 [GET] http://prowlarr:9696/4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD: 500.InternalServerError (143 bytes) <?xml version="1.0" encoding="UTF-8"?> <error code="500" description="Invalid torrent file contents. Reason: Invalid torrent file specified" /> 2025-11-24 17:30:57.2|Info|RTorrent|Request for rutorrent_3 failed with exception 'HTTP request failed: [500:InternalServerError] [GET] at [http://prowlarr:9696/4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD]'. Retrying in 3.9621371s. [v6.0.4.10291] NzbDrone.Common.Http.HttpException: HTTP request failed: [500:InternalServerError] [GET] at [http://prowlarr:9696/4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD] at NzbDrone.Common.Http.HttpClient.ExecuteAsync(HttpRequest request) in ./NzbDrone.Common/Http/HttpClient.cs:line 119 at NzbDrone.Core.Download.TorrentClientBase`1.<>c.<<DownloadFromWebUrl>b__11_0>d.MoveNext() in ./NzbDrone.Core/Download/TorrentClientBase.cs:line 143 --- End of stack trace from previous location --- at Polly.ResiliencePipeline.<>c__9`2.<<ExecuteAsync>b__9_0>d.MoveNext() <?xml version="1.0" encoding="UTF-8"?> <error code="500" description="Invalid torrent file contents. Reason: Invalid torrent file specified" /> ``` ### Expected Behavior An attempt at downloading a torrent that was removed from PTP should return 404. ### Steps To Reproduce _No response_ ### Environment ```markdown - OS: Linux - Prowlarr: 2.3.0.5236 - Docker Install: Yes ``` ### What branch are you running? Master ### Trace Logs? As you can see from the trace logs below, PTP responds with a HTML page for this torrent. I guess the problem is that the HTML page returns a 200 because it redirects to the deletion log. ``` 2025-11-25 13:35:56.2|Trace|Http|Req: 116051 [GET] /4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD (from 172.18.0.11 curl/8.14.1) 2025-11-25 13:35:56.2|Trace|DownloadService|Attempting download of https://passthepopcorn.me/torrents.php?action=download&id=(removed) 2025-11-25 13:35:56.2|Trace|IndexerHttpClient|Req: [GET] https://passthepopcorn.me/torrents.php?action=download&id=(removed) 2025-11-25 13:35:56.2|Trace|ConfigService|Using default config value for 'proxyenabled' defaultValue:'False' 2025-11-25 13:35:56.3|Trace|IndexerHttpClient|Res: HTTP/1.1 [GET] https://passthepopcorn.me/torrents.php?action=download&id=(removed) 302.Found (0 bytes) (125 ms) 2025-11-25 13:35:56.3|Debug|PassThePopcorn|Download request is being redirected to: https://passthepopcorn.me/log.php?search=1466727 2025-11-25 13:35:56.3|Trace|RateLimitService|Rate Limit triggered, delaying 'passthepopcorn.me' for 3.874 sec 2025-11-25 13:36:00.2|Trace|IndexerHttpClient|Req: [GET] https://passthepopcorn.me/log.php?search=1466727 2025-11-25 13:36:00.2|Trace|ConfigService|Using default config value for 'proxyenabled' defaultValue:'False' 2025-11-25 13:36:00.3|Trace|Http|Res: 115995 [GET] /signalr/messages?access_token=(removed)&id=(removed) 101.SwitchingProtocols (154176 ms) 2025-11-25 13:36:00.4|Trace|Http|Req: 116052 [GET] /system/logs/files (from 172.*.*.195 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0) 2025-11-25 13:36:00.4|Debug|Prowlarr.Http.Authentication.NoAuthenticationHandler|AuthenticationScheme: External was successfully authenticated. 2025-11-25 13:36:00.4|Trace|Http|Res: 116052 [GET] /system/logs/files: 200.OK (0 ms) 2025-11-25 13:36:00.4|Trace|Http|Req: 116053 [POST] /signalr/messages/negotiate?access_token=(removed)&negotiateVersion=1 (from 172.*.*.195 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0) 2025-11-25 13:36:00.4|Trace|Http|Res: 116053 [POST] /signalr/messages/negotiate?access_token=(removed)&negotiateVersion=1: 200.OK (11 ms) 2025-11-25 13:36:00.5|Trace|IndexerHttpClient|Res: HTTP/1.1 [GET] https://passthepopcorn.me/log.php?search=1466727: 200.OK (13534 bytes) (316 ms) 2025-11-25 13:36:00.5|Debug|PassThePopcorn|Downloaded for release finished (13534 bytes from https://passthepopcorn.me/torrents.php?action=download&id=(removed) 2025-11-25 13:36:00.5|Debug|PassThePopcorn|Invalid torrent file contents: <!DOCTYPE html> <html> <head> (i removed all the HTML content here, it was a raw HTML page) </body> </html> 2025-11-25 13:36:00.9|Trace|Http|Req: 116054 [GET] /initialize.json?t=1764074160403 (from 172.*.*.195 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0) 2025-11-25 13:36:00.9|Debug|Prowlarr.Http.Authentication.NoAuthenticationHandler|AuthenticationScheme: External was successfully authenticated. 2025-11-25 13:36:00.9|Trace|Http|Res: 116054 [GET] /initialize.json?t=1764074160403: 200.OK (0 ms) 2025-11-25 13:36:00.5|Error|NewznabController|System.NotSupportedException: Invalid torrent file contents. Reason: Invalid torrent file specified [v2.3.0.5236] System.NotSupportedException: Invalid torrent file contents. Reason: Invalid torrent file specified ---> MonoTorrent.TorrentException: Invalid torrent file specified ---> MonoTorrent.BEncoding.BEncodingException: Invalid data found. Aborting at MonoTorrent.BEncoding.BEncodeDecoder.DecodeTorrent(RawReader reader) at MonoTorrent.Torrent.Load(Stream stream, String path) --- End of inner exception stack trace --- at MonoTorrent.Torrent.Load(Stream stream, String path) at MonoTorrent.Torrent.Load(Byte[] data) at NzbDrone.Core.Indexers.TorrentIndexerBase`1.ValidateDownloadData(Byte[] fileData) in ./NzbDrone.Core/Indexers/TorrentIndexerBase.cs:line 24 --- End of inner exception stack trace --- at NzbDrone.Core.Indexers.TorrentIndexerBase`1.ValidateDownloadData(Byte[] fileData) in ./NzbDrone.Core/Indexers/TorrentIndexerBase.cs:line 29 at NzbDrone.Core.Indexers.HttpIndexerBase`1.Download(Uri link) in ./NzbDrone.Core/Indexers/HttpIndexerBase.cs:line 327 at NzbDrone.Core.Download.DownloadService.DownloadReport(String link, Int32 indexerId, String source, String host, String title) in ./NzbDrone.Core/Download/DownloadService.cs:line 151 at NzbDrone.Api.V1.Indexers.NewznabController.GetDownload(Int32 id, String link, String file) in ./Prowlarr.Api.V1/Indexers/NewznabController.cs:line 276 2025-11-25 13:36:00.9|Trace|Http|Res: 116051 [GET] /4/download?apikey=(removed)&link=REw2N2RCbWtlb2FabW83cHJhZ1VCQTJsOWRTRnBUTm04RUNnemNWZ0VKMUxnTW1NR3g5YitFdXlkU2xudkRqT1RtV1ZWQ05FdkhzaFhabzBxVmIxdUYrWkEreGxrcGFaMVQvaEdreFhZSmd2bHpZSEU3SWt1R2tmdlZlRmw5bEI&file=Addams.Family.Values.1993.1080p.BluRay.DD%2B5.1.x264-playHD: 500.InternalServerError (4766 ms) ``` ### I attest that Trace Logs have been provided as applicable. Reports will be closed if the required logs are not provided. - [x] I attest that I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain `trace` - that are relevant and show this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Prowlarr#1257
No description provided.