Skip to content

Add user-friendly SOPS decryption error handling - #36

Merged
gianluca-mascolo merged 1 commit into
mainfrom
fix-sops-error-handling
Dec 18, 2025
Merged

gianluca-mascolo merged 1 commit into
mainfrom
fix-sops-error-handling

Conversation

@gianluca-mascolo

Copy link
Copy Markdown
Owner

Summary

  • Add SopsDecryptionError exception with structured error message
  • Show GPG key ID required for decryption (from .sops.yaml)
  • Add GTK error dialogs for startup and runtime failures
  • Handle label switching errors gracefully in GTK mode

Test plan

  • All tests pass (poetry run pytest)
  • Code formatted (make fmt)
  • Verified script mode error output
  • Manual test: GTK dialog on startup failure (requires X11)
  • Manual test: GTK dialog on label switch failure (requires X11)

🤖 Generated with Claude Code

- Add SopsDecryptionError exception with clear message structure
- Show human-readable error message first with possible causes
- Display required GPG key ID (short format) from .sops.yaml
- Use UTF-8 separators for visual clarity
- Move SOPS technical details to end of message
- Add GTK error dialog for startup failures (visible from desktop menu)
- Handle runtime decryption errors when switching labels in GTK mode

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gianluca-mascolo
gianluca-mascolo merged commit bcdf8a1 into main Dec 18, 2025
1 check passed
@gianluca-mascolo
gianluca-mascolo deleted the fix-sops-error-handling branch December 18, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant