An unjustified deviation can be a serious breach of the contract of carriage, and the carrier will be prevented from relying upon any exclusion clause which limits his liability. Such clauses include the "liberty clauses" of Leduc v Ward, but in particular include the huge range of exemptions granted to carriers by Article IV of the Hague-Visby Rules.
