This commit is contained in:
2022-06-22 18:35:26 +00:00
parent b14b36c6e9
commit 9198e2a3ea
4 changed files with 56 additions and 9 deletions

View File

@@ -149,18 +149,13 @@ namespace AyaNovaQBI
}
else
{
/*
"error": {
"code": "2001",
"message": "\"E1020 - License key expired 2022-06-20 5:00 PM\r\nLogin as SuperUser to start evaluation / install license\""
}
*/
if (a.ObjectResponse != null && a.ObjectResponse.ContainsKey("error"))
{
var errCode = a.ObjectResponse["error"]["code"].Value<string>();
if (errCode.Contains("2003")) return false;//simple authentication error
//some other error, possibly expired ayanova license etc, show it so it's clear why the login failed so they known it's not a creds issue
var errMessage = a.ObjectResponse["error"]["message"].Value<string>();
throw new Exception($"Code: {errCode} - {errMessage}");
}
@@ -483,7 +478,6 @@ namespace AyaNovaQBI
var r = await GetAsync("license");
ALicense = r.ObjectResponse["data"]["license"].ToObject<AyaNovaLicense>();
//UNEXPIRED AYANOVA LICENSE?
if (ALicense.licenseWillExpire && ALicense.licenseExpiration < DateTime.UtcNow)
{
@@ -491,7 +485,6 @@ namespace AyaNovaQBI
return false;
}
//QBI LICENSED?
if (ALicense.features.FirstOrDefault(z => z.Feature == "QBI") == null)
{