improve error handling while retrieving user balance and history