mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-06 16:33:52 +01:00
improve exception handling
This commit is contained in:
parent
9db6cf2ce7
commit
0f0c31f4c6
1 changed files with 1 additions and 5 deletions
|
|
@ -233,10 +233,6 @@ public List<Artist> SearchForNewArtist(string title)
|
||||||
|
|
||||||
return httpResponse.Resource.SelectList(MapSearchResult);
|
return httpResponse.Resource.SelectList(MapSearchResult);
|
||||||
}
|
}
|
||||||
catch (SkyHookException)
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
catch (HttpException ex)
|
catch (HttpException ex)
|
||||||
{
|
{
|
||||||
_logger.Warn(ex);
|
_logger.Warn(ex);
|
||||||
|
|
@ -247,7 +243,7 @@ public List<Artist> SearchForNewArtist(string title)
|
||||||
_logger.Warn(ex);
|
_logger.Warn(ex);
|
||||||
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with LidarrAPI. {1}", ex, title, ex.Message);
|
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);
|
_logger.Warn(ex);
|
||||||
throw new SkyHookException("Search for '{0}' failed. Invalid response received from LidarrAPI. {1}", ex, title, ex.Message);
|
throw new SkyHookException("Search for '{0}' failed. Invalid response received from LidarrAPI. {1}", ex, title, ex.Message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue