Improved error handling in WassSessionIdRetriever and added several tests