mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-24 06:50:43 +00:00
Include exception message in LidarrAPI failure message
(cherry picked from commit 1e89a1a3cb8fa83e4415b047513cbecacbebc59c) Closes #5176
This commit is contained in:
parent
babdf10273
commit
166f87ae68
2 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Alert from 'Components/Alert';
|
||||
import TextInput from 'Components/Form/TextInput';
|
||||
import Icon from 'Components/Icon';
|
||||
import Button from 'Components/Link/Button';
|
||||
|
@ -130,7 +131,8 @@ class AddNewItem extends Component {
|
|||
<div className={styles.helpText}>
|
||||
{translate('FailedLoadingSearchResults')}
|
||||
</div>
|
||||
<div>{getErrorMessage(error)}</div>
|
||||
|
||||
<Alert kind={kinds.DANGER}>{getErrorMessage(error)}</Alert>
|
||||
</div> : null
|
||||
}
|
||||
|
||||
|
|
|
@ -228,17 +228,17 @@ public List<Artist> SearchForNewArtist(string title)
|
|||
catch (HttpException ex)
|
||||
{
|
||||
_logger.Warn(ex);
|
||||
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with LidarrAPI.", ex, title);
|
||||
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with LidarrAPI. {1}", ex, title, ex.Message);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
_logger.Warn(ex);
|
||||
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with LidarrAPI.", ex, title, ex.Message);
|
||||
throw new SkyHookException("Search for '{0}' failed. Unable to communicate with LidarrAPI. {1}", ex, title, ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Warn(ex, ex.Message);
|
||||
throw new SkyHookException("Search for '{0}' failed. Invalid response received from LidarrAPI.", ex, title);
|
||||
_logger.Warn(ex);
|
||||
throw new SkyHookException("Search for '{0}' failed. Invalid response received from LidarrAPI. {1}", ex, title, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue