Add unit tests for failures
Units tests only check cases where functions are expected to return successfully. We should also check the cases where the functions are expected to return errors.
Units tests only check cases where functions are expected to return successfully. We should also check the cases where the functions are expected to return errors.