If you have signed a contract subject to building or building and pest inspection on an existing house and defects are found, yes you can get out of contact.
If it’s a new home then you don’t pay the stage or final payment until it’s completely fixed and then checked by us.