Every duty under this chapter and every act that must be performed as a condition precedent to the exercise of a right or remedy under this chapter imposes an obligation of good faith in its performance or enforcement. The aggrieved party has a duty to mitigate damages.