Exit workflow with error after loop

Hi there,
I use a loop in my workflow to perform several steps a specific number of times (e.g. repeat for 10 times). In the loop there is a special step which result can be success or fail.
The loop will be continued until this step is successfull once; after that, there is a break condition exiting the loop. This works really fine.
If after the loop ends and still the step was not successfull, I want the whole workflow job to fail.
Actually I see no aquivalent to a exit(errorcode) like in a batch or something.
How can I provocate that the workflow will fail?

Thanks in advance!

I was looking for something like this, I ended up creating a step with invalid inputs to force a failure for my use case. Waste of a step and it can be confusing, but it worked.

hmmmh, of course this would be a solution, thank’s for the hint. I could try to get an IDR investigation with an ID that will never be exist → error.
But is there really nothing out of the box to do some kind of poor error handling?