The challenge is to define what constitutes an "error" in any given circumstance and to shut down the system safely when such errors occur.
The complexity of understanding all the failure modes of a robotic system coupled with the high amount of energy available to the mechanism is what has made it difficult to have robots in the vicinity of humans.
Highly complex systems with many of the same characteristics as robots fail frequently, the most notable examples being the space shuttle and other aircraft. Despite best efforts, these systems fail.
"When Bob loads his parts, he says the machine stops running, Fix it!"
Well, Bob put his parts in backwards.
"You need to be proactive and make a jig so Bob can't do that"
OK I've done that! Now Bob can't put his parts in backwards.
"Bob says the machine won't run for more than an hour"
Well, that's because Bob unboxes the parts and the empty cardboard boxes pile up and block the photo-eye safety curtain of light, which shuts off the machine.
"Do something about that!"
OK, I've made a case crusher to flatten and bale Bob's trash. "Great! But why doesn't Bob just use the bin near his work station?"
I dunno, but you told me to fix Bob's unwillingness to break flat and throw out his trash.
"That's wasting money and we're already over budget!"
Uhmmmm....OK!
I kid you not! That is what goes on in every manufacturing plant in America these days.
I set my overcurrent and overtorque limits within a mouse fart of low, so that an extra few ounces of resistance send a bit to the error file which soft stops the machine. Hard stops are a very, very bad thing. ie, e-stops. Machines turning at a few thousand RPM which come to an instant stop will require complete rehoming and calibration to allow a new run enable bit to latch the main control relay. Sometimes this can take hours. The law requires hard e-stops be within reach, but the regular stop button is closer and more plentiful. But the operator doesn’t care. They know if they hit the e-stop they get an hour long break.