Add comprehensive error handling throughout StackBox with helpful error messages that guide users to solutions. Handle common failure scenarios gracefully.
Goals
- Catch and handle common errors
- Provide actionable error messages
- Suggest fixes for problems
- Improve user experience
Common Errors to Handle
Docker not running
try:
subprocess.run(["docker", "ps"], check=True, capture_output=True)
except:
click.echo("❌ Docker not running")
click.echo(" Start with: sudo systemctl start docker")
sys.exit(1)
Ports already in use
if port_in_use(6385):
click.echo("❌ Port 6385 already in use")
click.echo(" Check: lsof -i :6385")
sys.exit(1)
Insufficient resources
if disk_space_gb() < 20:
click.echo("⚠️ Low disk space (< 20GB)")
click.echo(" Clean up: docker system prune")
Acceptance Criteria
Testing
Test each error scenario and verify helpful message is shown.
Add comprehensive error handling throughout StackBox with helpful error messages that guide users to solutions. Handle common failure scenarios gracefully.
Goals
Common Errors to Handle
Docker not running
Ports already in use
Insufficient resources
Acceptance Criteria
Testing
Test each error scenario and verify helpful message is shown.