diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-13 20:25:06 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-13 20:25:06 -0400 |
commit | afb3c49bbaab07f3148f70d54f5140cdd83f8c20 (patch) | |
tree | dd60902c878c38617f97644b912afb38c568755e /src/SMAPI.Web/Framework/ModRepositories | |
parent | 833d98f49136325edfc4463097710cf2391dd5b2 (diff) | |
parent | 76445dc3589265ba259070300120e96a17957e50 (diff) | |
download | SMAPI-afb3c49bbaab07f3148f70d54f5140cdd83f8c20.tar.gz SMAPI-afb3c49bbaab07f3148f70d54f5140cdd83f8c20.tar.bz2 SMAPI-afb3c49bbaab07f3148f70d54f5140cdd83f8c20.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Framework/ModRepositories')
-rw-r--r-- | src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs index cfa757ab..e1dc0fcc 100644 --- a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs +++ b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs @@ -39,9 +39,11 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories try { NexusMod mod = await this.Client.GetModAsync(nexusID); - return mod != null - ? new ModInfoModel(mod.Name, this.NormaliseVersion(mod.Version), mod.Url) - : new ModInfoModel("Found no mod with this ID."); + if (mod == null) + return new ModInfoModel("Found no mod with this ID."); + if (mod.Error != null) + return new ModInfoModel(mod.Error); + return new ModInfoModel(mod.Name, this.NormaliseVersion(mod.Version), mod.Url); } catch (Exception ex) { |