contract-law liability
If a product is faulty, who can be held liable?
<p>Say I make a website for someone else. In the website I use a library for processing payments. Say there is a bug in the 3rd party library and it is latter found by the website owner. Can they sue me or the maker or the library? What kind of terms can I include in a contract I have them sign so this can't happen? I guess it's related to <a href="https://law.stackexchange.com/questions/17277/when-are-non-indemnification-type-clauses-needed-in-a-contract">When are non-indemnification type clauses needed in a contract?</a></p>

<p>Another example I'm curious about is someone builds a house. It turns out the lumber company gave them the wrong kind of wood and it rots. Would the home owner sue the lumber company or the people who they hired to build the house?</p>

<h2>Everyone involved</h2>

<p><strong>Contractural Liability</strong></p>

<p>Every transaction is part of a chain of transactions and the normal course of action is to sue along the chain.</p>

<p>For the website situation, the website owner sues you you sue the 3rd party software provider. For the building situation, the homeowner sues the builder and they sue the lumber yard and so in up the chain.</p>

<p>Now liability can be limited by the contract (subject to any legal restrictions on such limitation). So, you may be liable to the website owner but the 3rd party supplier may have limited their liability to you: if so, the buck stops with you.</p>

<p>Another way the chain may be broken is if one of the parties no longer exists - is bankrupt, dead, liquidated or simply cannot be found (more of a practical issue than a legal one).</p>

<p><strong>Negligence</strong></p>

<p>Notwithstanding the contract chain, anyone can sue anyone for negligence. That is the plaintiff alleges the defendant owed them a duty of care, failed in that duty and damage resulted.</p>

<p>The foundational case is <a href="https://en.m.wikipedia.org/wiki/Donoghue_v_Stevenson" rel="nofollow noreferrer">Donoghue v Stevenson</a> where Donoghue drank ginger beer with a snail in it that had been manufactured by Stevenson. She by-passed the contractural chain because as she had received the ginger beer as a gift, she had no contract with anyone.</p>

<p>Now a contract cannot limit your liability to anyone who is not a party to the contract. However, a contract can make someone else responsible for any damages you have to pay and any legal costs. This is called an indemnity and it is basically how insurance works. Notwithstanding, it's still you being sued and if your indemnifies doesn't pay (because they went broke or you didn't fulfil the terms of your contract with them) you will have to.</p>
