mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
@@ -244,7 +244,9 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
|
||||
if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
throw new IndexerException(indexerResponse, "Unexpected response status '{0}' code from indexer request", indexerResponse.HttpResponse.StatusCode);
|
||||
STJson.TryDeserialize<JsonRpcResponse<NebulanceErrorResponse>>(indexerResponse.HttpResponse.Content, out var errorResponse);
|
||||
|
||||
throw new IndexerException(indexerResponse, "Unexpected response status '{0}' code from indexer request: {1}", indexerResponse.HttpResponse.StatusCode, errorResponse?.Result?.Error?.Message ?? "Check the logs for more information.");
|
||||
}
|
||||
|
||||
JsonRpcResponse<NebulanceResponse> jsonResponse;
|
||||
@@ -410,4 +412,14 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
|
||||
public IEnumerable<string> Tags { get; set; } = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public class NebulanceErrorResponse
|
||||
{
|
||||
public NebulanceErrorMessage Error { get; set; }
|
||||
}
|
||||
|
||||
public class NebulanceErrorMessage
|
||||
{
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user