1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Fix for key not found, returning a generic error instead

This commit is contained in:
margaale 2017-02-21 18:58:54 -03:00
parent 0af48fb2e8
commit fa89d33900

View File

@ -83,16 +83,23 @@ public string GetMessage(DiskStationApi api)
{
return AuthMessages[Code];
}
if (api == DiskStationApi.DownloadStationTask && DownloadStationTaskMessages.ContainsKey(Code))
{
return DownloadStationTaskMessages[Code];
}
if (api == DiskStationApi.FileStationList && FileStationMessages.ContainsKey(Code))
{
return FileStationMessages[Code];
}
return CommonMessages[Code];
if (CommonMessages.ContainsKey(Code))
{
return CommonMessages[Code];
}
return $"{ Code } - Unknown error";
}
}
}