mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-09 01:05:48 +01:00
Improve messaging for invalid request for M-Team-TP
This commit is contained in:
parent
8cf32020f7
commit
c7dfde0ce9
1 changed files with 8 additions and 0 deletions
|
|
@ -338,6 +338,13 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
|
||||
if (jsonResponse?.Data?.Torrents == null)
|
||||
{
|
||||
if (jsonResponse != null &&
|
||||
jsonResponse.Message.IsNotNullOrWhiteSpace() &&
|
||||
jsonResponse.Message.ToUpperInvariant() != "SUCCESS")
|
||||
{
|
||||
throw new IndexerException(indexerResponse, $"Invalid response received from M-Team. Response from API: {jsonResponse.Message}");
|
||||
}
|
||||
|
||||
return releaseInfos;
|
||||
}
|
||||
|
||||
|
|
@ -464,6 +471,7 @@ internal class MTeamTpApiSearchQuery
|
|||
internal class MTeamTpApiResponse
|
||||
{
|
||||
public MTeamTpApiData Data { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
||||
internal class MTeamTpApiData
|
||||
|
|
|
|||
Loading…
Reference in a new issue