diff --git a/frontend/src/Components/Form/Form.css b/frontend/src/Components/Form/Form.css index 52e79aec4..6de20bbac 100644 --- a/frontend/src/Components/Form/Form.css +++ b/frontend/src/Components/Form/Form.css @@ -1,3 +1,7 @@ .validationFailures { margin-bottom: 20px; } + +.details { + margin-left: 5px; +} diff --git a/frontend/src/Components/Form/Form.css.d.ts b/frontend/src/Components/Form/Form.css.d.ts index 178f2fec1..078190641 100644 --- a/frontend/src/Components/Form/Form.css.d.ts +++ b/frontend/src/Components/Form/Form.css.d.ts @@ -1,6 +1,7 @@ // This file is automatically generated. // Please do not change this file! interface CssExports { + 'details': string; 'validationFailures': string; } export const cssExports: CssExports; diff --git a/frontend/src/Components/Form/Form.js b/frontend/src/Components/Form/Form.js index 79ad3fe8a..2f5f77a9a 100644 --- a/frontend/src/Components/Form/Form.js +++ b/frontend/src/Components/Form/Form.js @@ -1,7 +1,8 @@ import PropTypes from 'prop-types'; import React from 'react'; import Alert from 'Components/Alert'; -import { kinds } from 'Helpers/Props'; +import Icon from 'Components/Icon'; +import { icons, kinds } from 'Helpers/Props'; import styles from './Form.css'; function Form(props) { @@ -26,6 +27,16 @@ function Form(props) { kind={kinds.DANGER} > {error.errorMessage} + + { + error.detailedDescription ? + : + null + } ); }) @@ -39,6 +50,16 @@ function Form(props) { kind={kinds.WARNING} > {warning.errorMessage} + + { + warning.detailedDescription ? + : + null + } ); }) diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index 26d1bae96..1ccc983cf 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -18,6 +18,7 @@ using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser.Model; +using NzbDrone.Core.Validation; using Polly; using Polly.Retry; @@ -814,7 +815,10 @@ namespace NzbDrone.Core.Indexers { _logger.Warn(ex, "Unable to connect to indexer"); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, please check your DNS settings and ensure IPv6 is working or disabled. " + ex.Message); + return new NzbDroneValidationFailure(string.Empty, "Unable to connect to indexer, please check your DNS settings and ensure IPv6 is working or disabled. " + ex.Message) + { + DetailedDescription = ex.InnerException?.Message + }; } catch (TaskCanceledException ex) { @@ -841,7 +845,10 @@ namespace NzbDrone.Core.Indexers { _logger.Warn(ex, "Unable to connect to indexer"); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details. " + ex.Message); + return new NzbDroneValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details. " + ex.Message) + { + DetailedDescription = ex.InnerException?.Message + }; } return null;