refactor(engine): propagate SyncError through pull task instead of String
PullTask and PullTaskResult now carry Result<SyncPayload, SyncError> instead of Result<SyncPayload, String>. poll_pull_result pattern-matches on the error variant to show user-friendly messages: Network → "Can't reach server — check your connection" Auth → "Login expired — tap Sync Now after re-logging in" Other → original error Display Also removed the stale TODO comment from SyncError in lib.rs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,6 @@ use thiserror::Error;
|
||||
pub enum SyncError {
|
||||
#[error("unsupported platform for this sync backend")]
|
||||
UnsupportedPlatform,
|
||||
// TODO: Replace String with concrete source error types (e.g. reqwest::Error,
|
||||
// serde_json::Error) when real implementations are added in Phase 8.
|
||||
#[error("network error: {0}")]
|
||||
Network(String),
|
||||
#[error("authentication error: {0}")]
|
||||
|
||||
Reference in New Issue
Block a user