diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-25 21:21:27 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-25 21:21:27 -0400 |
commit | 2c87961c9e47aeba6eb7dbfca234cc457cb02158 (patch) | |
tree | d95c1d6a0fd4ce72d7c331b2950bfe1fc84cd6f2 /src/StardewModdingAPI.Web/Controllers/ModsController.cs | |
parent | 5cb183e16ddc661c38f4bd9e6e740b9457b8c437 (diff) | |
download | SMAPI-2c87961c9e47aeba6eb7dbfca234cc457cb02158.tar.gz SMAPI-2c87961c9e47aeba6eb7dbfca234cc457cb02158.tar.bz2 SMAPI-2c87961c9e47aeba6eb7dbfca234cc457cb02158.zip |
improve mod update-check validation & errors (#336)
Diffstat (limited to 'src/StardewModdingAPI.Web/Controllers/ModsController.cs')
-rw-r--r-- | src/StardewModdingAPI.Web/Controllers/ModsController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI.Web/Controllers/ModsController.cs b/src/StardewModdingAPI.Web/Controllers/ModsController.cs index 26cdfa31..7dcfcf13 100644 --- a/src/StardewModdingAPI.Web/Controllers/ModsController.cs +++ b/src/StardewModdingAPI.Web/Controllers/ModsController.cs @@ -106,14 +106,14 @@ namespace StardewModdingAPI.Web.Controllers // parse mod key if (!this.TryParseModKey(modKey, out string vendorKey, out string modID)) { - result[modKey] = new ModInfoModel("The mod key isn't in a valid format. It should contain the mod repository key and mod ID like 'Nexus:541'."); + result[modKey] = new ModInfoModel("The mod key isn't in a valid format. It should contain the site key and mod ID like 'Nexus:541'."); continue; } // get matching repository if (!this.Repositories.TryGetValue(vendorKey, out IModRepository repository)) { - result[modKey] = new ModInfoModel("There's no mod repository matching this namespaced mod ID."); + result[modKey] = new ModInfoModel($"There's no mod site with key '{vendorKey}'. Expected one of [{string.Join(", ", this.Repositories.Keys)}]."); continue; } |