added an exception handler for a failed server attempt