New: (BeyondHD) Better status messages for failures

Closes #1028
pull/1045/head
Qstick 2 years ago
parent 86f5768461
commit 7cf9fc6a4f

@ -201,6 +201,11 @@ namespace NzbDrone.Core.Indexers.Definitions
var jsonResponse = new HttpResponse<BeyondHDResponse>(indexerHttpResponse);
if (jsonResponse.Resource.StatusCode == 0)
{
throw new IndexerException(indexerResponse, $"Indexer Error: {jsonResponse.Resource.StatusMessage}");
}
foreach (var row in jsonResponse.Resource.Results)
{
var details = row.InfoUrl;
@ -272,6 +277,11 @@ namespace NzbDrone.Core.Indexers.Definitions
public class BeyondHDResponse
{
[JsonProperty(PropertyName = "status_code")]
public int StatusCode { get; set; }
[JsonProperty(PropertyName = "status_message")]
public string StatusMessage { get; set; }
public List<BeyondHDTorrent> Results { get; set; }
}

Loading…
Cancel
Save