feat: add structured error types for Tauri IPC commands
Introduces McError and McErrorCode to replace string-based errors in Tauri commands. This enables the frontend to handle errors programmatically rather than parsing error messages. Key design decisions: - Error codes use SCREAMING_SNAKE_CASE for frontend pattern matching - Each error indicates whether it's recoverable (user can retry) - Automatic conversion from LoreError, BeadsError, and BridgeError - Errors serialize to JSON for consistent IPC transport Error categories: - Lore: LORE_UNAVAILABLE, LORE_UNHEALTHY, LORE_FETCH_FAILED - Bridge: BRIDGE_LOCKED, BRIDGE_MAP_CORRUPTED, BRIDGE_SYNC_FAILED - Beads: BEADS_UNAVAILABLE, BEADS_CREATE_FAILED, BEADS_CLOSE_FAILED - General: IO_ERROR, INTERNAL_ERROR Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
//! - br CLI (beads task management)
|
||||
//! - MC local state (mapping, decisions, settings)
|
||||
|
||||
pub mod lore;
|
||||
pub mod beads;
|
||||
pub mod bridge;
|
||||
pub mod lore;
|
||||
pub mod state;
|
||||
|
||||
Reference in New Issue
Block a user