Eser sözleşmesi TBK. 470 vd. hükümlerinde düzenlenmiştir. Kanundan hareketle eser sözleşmesinde yüklenici, maddi ya da gayri maddi bir varlığı olan bir eser meydana getirmekte, alıcı ise bu edime karşılık ücret ödeme borcu altına girmektedir. İşgörme sözleşmelerinin bir türü olan eser sözleşmelerinde edim sonucuna yönelik taahhüt, bu tür sözleşmelerin ayırıcı unsurudur. Eser sözleşmesinde yüklenici, ücret karşılığında bir eseri meydana getirmek ve meydana getirmiş olduğu eseri teslim etmek hususlarını işsahibine borçlanmaktadır. Eser sözleşmelerinde yüklenicinin borçlarından birisi ise ayıba karşı tekeffül borcudur. Ayıba karşı tekeffül borcu, işsahibinin sözleşmede meydana getirilmesi kararlaştırılan eserin kusursuz ve eksiksiz olmasına ilişkin menfaatini korumaktadır. Ayıptan doğan sorumluluk hükümleri birçok hâlde teslimden sonra gündeme gelmekle beraber, bazı durumlarda teslimden önceki aşamalarda da uygulama alanı bulmaktadır. Yüklenici, eserin ayıplı olması durumunda, Kanunda öngörülen şartların sağlanması kaydıyla, eserdeki ayıptan sorumlu olur. Kanunkoyucu, eserin ayıplı olması durumunda alıcıya; sözleşmeden dönme, bedelde indirim ve onarım seçimlik haklarının yanısıra tazminat hakkı da tanımaktadır. Aşağıda ayıptan doğan sorumluluğun şartları ve sonuçları sırası ile incelemeye tabi tutulacaktır.