summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs')
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
index 9679f93e..a4ae61eb 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
@@ -41,7 +41,13 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
if (mod == null)
return new ModInfoModel().WithError(RemoteModStatus.DoesNotExist, "Found no Nexus mod with this ID.");
if (mod.Error != null)
- return new ModInfoModel().WithError(RemoteModStatus.TemporaryError, mod.Error);
+ {
+ RemoteModStatus remoteStatus = mod.Status == NexusModStatus.Hidden || mod.Status == NexusModStatus.NotPublished
+ ? RemoteModStatus.DoesNotExist
+ : RemoteModStatus.TemporaryError;
+ return new ModInfoModel().WithError(remoteStatus, mod.Error);
+ }
+
return new ModInfoModel(name: mod.Name, version: this.NormaliseVersion(mod.Version), previewVersion: mod.LatestFileVersion?.ToString(), url: mod.Url);
}
catch (Exception ex)