emitting an error on failure