mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-03-27 07:05:27 +01:00
parent
ab043e87dc
commit
39befe5aa4
1 changed files with 13 additions and 1 deletions
|
|
@ -244,7 +244,9 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
|
||||
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 @@ public class NebulanceTorrent
|
|||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue