I’m sympathetic to @Bijan’s point. As much as we’d all like to enforce safety via the type system, it’s often either impossible or very unwieldy. As such, there will be a healthy dose of runtime checks in any significant application. Pushing all errors to the caller doesn’t make sense - some of them cannot be handled by them; they may not even know what they mean. And ultimately, the puck has to stop somewhere - if an invariant is violated (ie a bug) then someone somewhere has to either panic or do something about it. The further you move away from the spot of the violation, the less likely it is that the error can be handled in any reasonable manner, and moreover, the less likely it is to be easily determinable whether it’s even ok to continue running the application.
So, I think these things are a fact of life. Rust can reduce but not eliminate them. Errors should be surfaced only when it’s expected the caller can do something about them.
Being able to exploit the type system to reduce runtime errors is sort of the motivation for me posting https://users.rust-lang.org/t/examples-of-modeling-a-domain-with-strong-type-safety-expressiveness-and-performance.