If it is something that can be overcome by making the lenders UW with providing new or different documents to make the loan, then you move forward with the sale. If it is an issue of the home being purchased not being appraised for sales price then you can go back to seller and see if will take the lesser or pay something in between and you the buyer pay the difference.
If there is no way to get your loan approved, or seller will not accept a lesser value then you have an out for your purchase. This will cancel the transaction and any funds you have paid to the escrow company would be refunded to you.
To help you out I would start by sitting down with a mortgage banker like me to go over your options and do a pre-approved mortgage prior to making an offer. This way we can together go over any type of issues that may come up. Let me know if I can help.