add error reporting unit tests