Add test for passing Error() objects