Include exception message in SkyHook failure message

This commit is contained in:
Bogdan 2024-10-10 21:17:20 +03:00
parent 3c995a0fff
commit 0049922ab6
2 changed files with 6 additions and 4 deletions

View file

@ -131,7 +131,9 @@ class AddNewMovie extends Component {
<div className={styles.helpText}>
{translate('FailedLoadingSearchResults')}
</div>
<Alert kind={kinds.WARNING}>{getErrorMessage(error)}</Alert>
<Alert kind={kinds.DANGER}>{getErrorMessage(error)}</Alert>
<div>
<Link to="https://wiki.servarr.com/radarr/troubleshooting#invalid-response-received-from-tmdb">
{translate('WhySearchesCouldBeFailing')}

View file

@ -534,17 +534,17 @@ public List<Movie> SearchForNewMovie(string title)
catch (HttpException ex)
{
_logger.Warn(ex);
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with RadarrAPI.", ex, title);
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with RadarrAPI. {1}", ex, title, ex.Message);
}
catch (WebException ex)
{
_logger.Warn(ex);
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with RadarrAPI.", ex, title, ex.Message);
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with RadarrAPI. {1}", ex, title, ex.Message);
}
catch (Exception ex)
{
_logger.Warn(ex);
throw new SkyHookException("Search for '{0}' failed. Invalid response received from RadarrAPI.", ex, title);
throw new SkyHookException("Search for '{0}' failed. Invalid response received from RadarrAPI. {1}", ex, title, ex.Message);
}
}