error message is not needed here

I don't think the function refreshSession() need to display error message if session has timed out as its task is to refresh session irrespective of session has timed out or not
Displaying an error message here doesn't seems to be a nice option as newSession() is being called in the next step
Have a look