public RaftError getRaftError() {
        return this.state == null ? RaftError.SUCCESS : RaftError.forNumber(this.state.code);
    }
Get raft error from error code.
jraft-core/src/main/java/com/alipay/sofa/jraft/Status.java