catch send exceptions correctly