improve exception handling

This commit is contained in:
bakerboy448 2025-08-29 09:59:01 -05:00
parent 9db6cf2ce7
commit 0f0c31f4c6

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);