General Provisions
(1) No right of private defence exists against a good-faith public servant's act (or one done on their direction) that doesn't reasonably cause fear of death/grievous hurt, even if not strictly lawful - or where there's time to seek public authorities' protection instead. (2) Private defence never extends to more harm than necessary.
This limits private defence in two key ways: you generally cannot use it against a good-faith public official's actions (like a police officer) unless they threaten serious harm, and you cannot use it at all if you had a real opportunity to simply call for official help instead - plus, however defence is exercised, it can never go beyond what's genuinely necessary.
You generally cannot claim private defence for resisting a police officer's good-faith action (even one that later turns out to be technically unlawful) unless it genuinely threatens death or grievous injury - and if you had time to call the police instead of taking matters into your own hands, private defence typically won't apply.