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
1 changed files with 8 additions and 1 deletions

View File

@ -83,16 +83,23 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation.Responses
{
return AuthMessages[Code];
}
if (api == DiskStationApi.DownloadStationTask && DownloadStationTaskMessages.ContainsKey(Code))
{
return DownloadStationTaskMessages[Code];
}
if (api == DiskStationApi.FileStationList && FileStationMessages.ContainsKey(Code))
{
return FileStationMessages[Code];
}
if (CommonMessages.ContainsKey(Code))
{
return CommonMessages[Code];
}
return $"{ Code } - Unknown error";
}
}
}