diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-06-07 02:08:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-07 02:08:05 +0900 |
| commit | 7161a30af7e1ac1eacc00add5487d036ab7cb9dc (patch) | |
| tree | 8ab7a3908c7986b8b674b8c063280d70cb9bd5b2 /Emby.Server.Implementations/Updates | |
| parent | 8ac2f1bb8be29bf9d2285958cb233692765bfe32 (diff) | |
improve error handling when a single repository has issues
Co-authored-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'Emby.Server.Implementations/Updates')
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 6c02b8fdc..b91094340 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -139,14 +139,19 @@ namespace Emby.Server.Implementations.Updates catch (SerializationException ex) { _logger.LogError(ex, "Failed to deserialize the plugin manifest retrieved from {Manifest}", manifest); - throw; + return Enumerable.Empty<PackageInfo>(); } } } catch (UriFormatException ex) { _logger.LogError(ex, "The URL configured for the plugin repository manifest URL is not valid: {Manifest}", manifest); - throw; + return Enumerable.Empty<PackageInfo>(); + } + catch (HttpException ex) + { + _logger.LogError(ex, "An error occurred while accessing the plugin manifest: {Manifest}", manifest); + return Enumerable.Empty<PackageInfo>(); } } @@ -159,7 +164,7 @@ namespace Emby.Server.Implementations.Updates result.AddRange(await GetPackages(repository.Url, cancellationToken).ConfigureAwait(true)); } - return result.ToList().AsReadOnly(); + return result.AsReadOnly(); } /// <inheritdoc /> |
