improve exception handling

This commit is contained in:
bakerboy448 2025-08-29 09:59:01 -05:00 committed by sharinganthief
parent 050bf8e3fd
commit d76b76882f

View file

@ -233,10 +233,6 @@ public List<Artist> SearchForNewArtist(string title)
return httpResponse.Resource.SelectList(MapSearchResult);
}
catch (SkyHookException)
{
throw;
}
catch (HttpException ex)
{
_logger.Warn(ex);
@ -247,7 +243,7 @@ public List<Artist> SearchForNewArtist(string title)
_logger.Warn(ex);
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with LidarrAPI. {1}", ex, title, ex.Message);
}
catch (Exception ex)
catch (Exception ex) when (ex is not SkyHookException)
{
_logger.Warn(ex);
throw new SkyHookException("Search for '{0}' failed. Invalid response received from LidarrAPI. {1}", ex, title, ex.Message);