Skip to content

Surface blocking errors to the user (after iptables backend exists) #24

Description

@TheZupZup

Overview

Currently, the only blocking operation is writing to the rules file, which already handles errors (though silently — see #10). This issue becomes meaningful once real OS-level blocking (#20) is implemented via iptables, where failures are much more likely (insufficient permissions, iptables not installed, rule already exists).

This issue is blocked by #20. Do not start it until the iptables backend is merged.

What needs to be done

  • After Implement iptables backend for OS-level IP blocking #20 is merged: wrap apply_block() and remove_block() calls in both tui.py and main.py with visible error feedback
    • TUI: use self.notify() for transient error messages
    • GTK GUI: use the existing show_error() dialog method
  • Distinguish between at least two failure modes:
    • iptables not found on the system → "iptables is not available on this system"
    • Permission denied → "Run SilentGuard with elevated privileges to enable OS-level blocking"
  • If iptables fails but the rules-file update succeeded, tell the user: "IP marked as blocked in SilentGuard but OS-level blocking failed"

Goal

When a block action fails at the OS level, the user sees a specific and actionable error message instead of a silent failure or a misleading success indicator.

Notes

Blocked by #20 — do not start this until apply_block() / remove_block() exist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions