fix update-check errors sometimes being overwritten with a generic error message

This commit is contained in:
Jesse Plamondon-Willard 2018-11-16 21:32:48 -05:00
parent d21bfc3ada
commit 04886afd29
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
2 changed files with 3 additions and 2 deletions

View File

@ -45,10 +45,11 @@
* mods can now load PNGs even if the game is currently drawing. * mods can now load PNGs even if the game is currently drawing.
* When comparing mod versions, SMAPI now considers `-unofficial` to be lower-precedence than any other value (e.g. `1.0-beta` is now considered newer than `1.0-unofficial` regardless of normal sorting). * When comparing mod versions, SMAPI now considers `-unofficial` to be lower-precedence than any other value (e.g. `1.0-beta` is now considered newer than `1.0-unofficial` regardless of normal sorting).
* Fixed content packs' `ReadJsonFile` allowing non-relative paths. * Fixed content packs' `ReadJsonFile` allowing non-relative paths.
* Fixed content pack always failing to load if they declare a dependency on a SMAPI mod. * Fixed content packs always failing to load if they declare a dependency on a SMAPI mod.
* Fixed trace logs not showing path for invalid mods. * Fixed trace logs not showing path for invalid mods.
* Fixed 'no update keys' warning not shown for mods with only invalid update keys. * Fixed 'no update keys' warning not shown for mods with only invalid update keys.
* Fixed `Context.IsPlayerFree` being true before the player finishes transitioning to a new location in multiplayer. * Fixed `Context.IsPlayerFree` being true before the player finishes transitioning to a new location in multiplayer.
* Fixed update-check errors sometimes being overwritten with a generic error message.
* Suppressed the game's 'added crickets' debug output. * Suppressed the game's 'added crickets' debug output.
* Updated dependencies (Harmony 1.0.9.1 → 1.2.0.1, Mono.Cecil 0.10 → 0.10.1). * Updated dependencies (Harmony 1.0.9.1 → 1.2.0.1, Mono.Cecil 0.10 → 0.10.1).
* **Deprecations:** * **Deprecations:**

View File

@ -252,7 +252,7 @@ namespace StardewModdingAPI.Web.Controllers
return await this.Cache.GetOrCreateAsync($"{repository.VendorKey}:{parsed.ID}".ToLower(), async entry => return await this.Cache.GetOrCreateAsync($"{repository.VendorKey}:{parsed.ID}".ToLower(), async entry =>
{ {
ModInfoModel result = await repository.GetModInfoAsync(parsed.ID); ModInfoModel result = await repository.GetModInfoAsync(parsed.ID);
if (result.Error != null) if (result.Error == null)
{ {
if (result.Version == null) if (result.Version == null)
result.Error = $"The update key '{updateKey}' matches a mod with no version number."; result.Error = $"The update key '{updateKey}' matches a mod with no version number.";