It's not supposed to fail. Anything could fail, and yeah that sucks. If it fails on the first try, it will probably fail on the second try.
Landing with gear up happens sometimes, and pilots are supposed to do a decent job with it. Large passenger jets have done this and been put back into service after repairs.
Failure can be detected. Throttle up, and any other needed adjustments, can be done immediately by the computer. Getting up off the runway again can be automatic.