It is a hard lesson to learn, but once you do, very helpful and calming.
If you feel uneasy about the project or customer, graciously remove yourself from the scenario.
Can think of a couple of projects that went bad during the process, you are now out of time, effort, material and a bad rep...