def validate_consumer(consumer):
    if not hasattr(consumer, "key"):
        raise ValueError("Invalid consumer.")
    return consumer
The plugin should fail if image import fails.
dataset/ETHPy150Open benoitc/restkit/restkit/filters.py/validate_consumer--crossover with--dataset/ETHPy150Open projectatomic/atomic-reactor/tests/plugins/test_import_image.py/test_exception_during_import