This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user