With these changes, my aim is to make the user experience more friendly during the connection and authentication steps. I've also tried to make our jobs as programmers a little easier. A summary of the changes:
Added an enumeration of possible NUT protocol responses, and a very basic function that will parse a response string into an enum value. More work to come, if it would be helpful.
Modified a log string to also print out what the error is specifically, to help the user understand what the problem is.
Modified the username portion of the authentication function to make use of the new responses enum, and handle another case of failure. I also removed the call to reconnect if there's an exception, since I think we'd want the process to hard-fail if there's any issue with authentication. This should hopefully help with error notification spam.
With these changes, my aim is to make the user experience more friendly during the connection and authentication steps. I've also tried to make our jobs as programmers a little easier. A summary of the changes:
I hope this is beneficial to you!