Replaced a try-catch in server