refactor(core,storage): deduplicate code patterns (TODO-014)
Extract PttCapability event construction helper in events.rs. Extract ensure_dir() helper in chanora_storage. Add TODO(refactor) annotations for patterns requiring shared crate or API changes.
This commit is contained in:
@@ -56,6 +56,10 @@ pub enum BridgeError {
|
||||
/// The caller submitted a malformed command DTO.
|
||||
#[error("invalid command: {0}")]
|
||||
InvalidCommand(String),
|
||||
// TODO(refactor): DnsFailed and ServerRejected mirror ProtocolError variants
|
||||
// in chanora_protocol. These cannot be unified without changing the public FFI
|
||||
// API (flutter_rust_bridge generates Dart types from these). Revisit only if
|
||||
// the bridge error types are being reworked.
|
||||
/// Hostname resolution failed. Distinct from `Connection` so the
|
||||
/// UI can show a meaningful "Server not found" message.
|
||||
#[error("dns: could not resolve '{host}': {reason}")]
|
||||
|
||||
Reference in New Issue
Block a user