summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI.Web/Framework/ModRepositories/NexusRepository.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/StardewModdingAPI.Web/Framework/ModRepositories/NexusRepository.cs b/src/StardewModdingAPI.Web/Framework/ModRepositories/NexusRepository.cs
index 74eef2ef..7e3ce4b6 100644
--- a/src/StardewModdingAPI.Web/Framework/ModRepositories/NexusRepository.cs
+++ b/src/StardewModdingAPI.Web/Framework/ModRepositories/NexusRepository.cs
@@ -42,7 +42,10 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
NexusResponseModel response = await this.Client
.GetAsync($"mods/{id}")
.As<NexusResponseModel>();
- return new ModInfoModel($"{this.VendorKey}:{id}", response.Name, response.Version, response.Url);
+
+ return response != null
+ ? new ModInfoModel($"{this.VendorKey}:{id}", response.Name, response.Version, response.Url)
+ : new ModInfoModel($"{this.VendorKey}:{id}", "Found no mod with this ID.");
}
catch (Exception ex)
{