fix: friendlier error when nft lacks permissions
All checks were successful
Dev / docker (push) Successful in 2m12s

This commit is contained in:
Stefano Bertelli 2026-03-31 00:04:27 -05:00
parent 49b2bd9083
commit f608c542d1

View file

@ -231,8 +231,8 @@ async def get_ruleset() -> str:
"""Dump the current nftables ruleset for troubleshooting.""" """Dump the current nftables ruleset for troubleshooting."""
try: try:
return await _nft("list ruleset") return await _nft("list ruleset")
except RuntimeError as e: except RuntimeError:
return f"Error: {e}" return "nftables is not available.\n\nThis requires root/NET_ADMIN privileges (production container)."
def _user_chain_name(user_id: str) -> str: def _user_chain_name(user_id: str) -> str: