Harkening back to Annissa's recent series on dealing with nightmare clients, those tips can help. However, there are still instances where a client gets upset.
Something could accidentally get broken, emotions are running high, or the customer just flat out wanted a different result. Their reasons for being unhappy may have nothing to do with you, but you could take the brunt of the anger.