getDatabase: properly handle redis connection failures