You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.Cli/Processors/ErrorHandling/ServiceErrorMessageExtracto...

24 lines
473 B

using Flurl.Http;
namespace Recyclarr.Cli.Processors.ErrorHandling;
public class ServiceErrorMessageExtractor : IServiceErrorMessageExtractor
{
private readonly FlurlHttpException _e;
public ServiceErrorMessageExtractor(FlurlHttpException e)
{
_e = e;
}
public async Task<string> GetErrorMessage()
{
return await _e.GetResponseStringAsync();
}
public int? GetHttpStatusCode()
{
return _e.StatusCode;
}
}