better define error throwing cases
fix error throwing tests