After all the hours spent searching for the perfect home, negotiating the purchase price, working with your broker and attorney to perfect the contract, and applying for a mortgage, it’s extremely disappointing and frustrating to be rejected for a loan.

But before you give up and decide you’ll never be able to afford a home, you should know that hundreds of people get rejected for loans every day. Sometimes it’s their fault, and sometimes lenders reject them for reasons that seem to defy logic or comprehension.

Here are some reasons why you might be rejected for a loan:

Credit Report Problems. When you apply for a loan, the lender will pull up a credit report, which they use to assess what kind of risk you’ll be. Various credit problems, including a history of late payments, a default on a prior loan, or a recent bankruptcy can derail your chances of getting approved.

What to do: Get a copy of your credit report and try to correct any errors or negative information in there by contacting your creditors.

Inconsistencies in Information. Sometimes lenders will find inconsistencies between what you’ve told them on the application and information the loan officer discovers. For example, if you say your income is $45,000 annually, and the lender calls your employer for verification and finds out that it’s only $30,000, it might be grounds for rejection of your application.

What to do: Be straight with the lender. Answer questions honestly and if you don’t know an answer, say so. Don’t make anything up. If you get caught providing false or misleading information, the penalties could be far worse than having your application rejected.

Employed Less Than Two Years. Lenders like to see the consistency of a stable income. And, they want to see that you’ve held a job for at least two years.

Recently, lenders have eased up on this requirement somewhat. If you’ve held a job at least a year, they may approve your application anyway. Or, if you’re recently changed jobs, either a promotion or a lateral transfer within the same career, they might also approve your application.

The only folks who get stuck following the letter of the rule are the self-employed. Lenders will not only want to see you in the same job for two years, they will want to see copies of your IRS tax returns and a profit-and-loss statement for the current year. Also, lenders will base your approval on your net income-to-debt ratio, not gross income. So if you gross $60,000 a year, but after expenses only net out $35,000, that’s the figure lenders will use to compute how much loan you can afford to carry.

What to do: Stay in your job. Try not to make any drastic moves (like resigning or changing careers) before you’ve closed on your new home. If you’re self-employed, make sure you can document your income and profits.

Losing Your Job. If you lose your job just before you close on your home, it can mean an instant rejection of your loan application, unless your spouse earns enough money to support the mortgage payments on his or her own.

What to do: If your application is denied based on job loss, wait until your prospects change and you’ve found a new job. If possible, try to find something in the same field, for about the same (or more) money, otherwise you may be subjected to the two-year employment rule.

Unapproved Condominium Building or New Development. Institutions that buy loans on the secondary market have a specific set of lending guidelines mortgage brokers and banker must follow. One of those states that the condo must be at least 70 percent owner-occupied. Lenders feel an owner-occupied building is a more stable one, where prices will likely go up since the owners will take better care of property they live in. If you’re buying a rehab or new-construction development, you may also have trouble getting approved for your loan.

What to do: If you’re buying in a building that is less than 70 percent owner-occupied, you may want to search out a portfolio lender who doesn’t resell loans on the secondary market. They may be more lenient on this issue. If you get rejected for a loan for your new town house or condo purchase, check with the developer. They will usually arrange for some sort of financing package from a lender who will keep the loans in-house for one to two years, and then resell them on the secondary market.

Low Appraisal. If your home doesn’t “appraise out” that means the lender has determined that the home is worth less than you’ve contracted to pay for it.

What to do: The lender may still give you a loan, but for 80 or 90 percent of the appraised value, not the contract price. That means you’ll either have to come up with the extra cash or renegotiate your purchase price.

Adding New Debt. Lenders don’t like to see your financial picture change between the time you apply for a loan and the day the loan closes. If you make a purchase that will significantly alter your debt-to-income ratio, that could be grounds for rejection.

What to do: Hold off on that new car purchase until after you’ve closed on your mortgage.

Refusal to Provide New Documentation. If the lender calls and asks you for additional information, you should provide it. An incomplete file is grounds for rejecting your loan.

What to do: If the lender asks for the same information over and over again, he or she could be taking you for a ride. Make sure you keep copies of all documents and the letters you send accompanying them. Also, send everything by registered or certified mail. That way you’ll know it was received, and you’ll have a paper trail verifying what you’ve sent. You can also ask your loan officer to send you a list of the documents he or she has received.

Racial Rejection. Although the mortgage industry has worked to eradicate racial prejudice from its loan approval process, it does rear its ugly head from time to time. It is illegal for lenders to discriminate against you based on race, sex, or age.

What to do: If you feel you’ve been discriminated against, you should call the federal Department of Housing and Urban Development office nearest to you. Also call your local municipality’s fair housing officials, and the department that regulates lenders in your state. Finally, consider sending a letter to the president of the company you feel has treated you unfairly. You may get a better response than you might have imagined.