Skip to content

Commit

Permalink
#1781 Radio Reference API - adds logging to log results of test conne…
Browse files Browse the repository at this point in the history
…ction or user login attempt for troubleshooting RR enterprise user login issues. (#1943)

Co-authored-by: Dennis Sheirer <[email protected]>
  • Loading branch information
DSheirer and Dennis Sheirer authored Jul 29, 2024
1 parent 24e11b8 commit 53d537b
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,14 @@ public static LoginStatus testConnectionWithExp(String userName, String password
throw new RadioReferenceException("The Radio Reference service is not providing user account details");
}

mLog.info("Radio Reference Test Connection Result - user [" + userName + "] expiration [" + ui.getExpirationDate() + "]");

return CheckExpDate(ui.getExpirationDate());
}
catch (RadioReferenceException rre)
{
mLog.error("Radio Reference Test Connection Failed - user [" + userName + "] error [" + rre.getMessage() + "]");

if (rre.hasFault())
{
Fault fault = rre.getFault();
Expand Down Expand Up @@ -297,14 +301,26 @@ else if (mLoginStatus == LoginStatus.EXPIRED_PREMIUM)
availableProperty().set(false);
premiumAccountProperty().set(false);
}

if(userInfo != null)
{
mLog.info("Radio Reference Account - User:" + userInfo.getUserName() +
" Expires:" + userInfo.getExpirationDate() +
" Login Status:" + mLoginStatus +
" Premium Access Enabled:" + premiumAccountProperty().get());
}
else
{
mLog.info("Radio Reference API did not provide a response from getUserData method call - premium access is disabled");
}
}
catch(RadioReferenceException rre)
{
accountExpiresProperty().setValue(null);
mLoginStatus = LoginStatus.UNKNOWN;
availableProperty().set(false);
premiumAccountProperty().set(false);

mLog.error("Error checking radio reference premium account status. Disabling premium access. Error: " + rre.getMessage());
}
}

Expand Down

0 comments on commit 53d537b

Please sign in to comment.