Fixed incorrect error message with outcome type and fixed end_to_end example.