Skip to content

Cloud sync: one failed asset transfer aborts the whole run and can crash hubble cloud watch #161

Description

@bholmesdev

Follow-up from #158, which added `res.ok` checks to asset upload/download in `packages/sync/src/sync.ts`. Throwing there is correct, but no call site catches:

  • A single failed asset aborts `sync()` before `writeSyncState`, so all file pushes/pulls from that run go unrecorded and get redone next run.
  • In `hubble cloud watch`, sync runs via `void scheduler.enqueue(...)` (`packages/cli/src/index.ts`) with no catch. One transient 500 on an asset fetch becomes an unhandled rejection that kills the watcher process. This crash path predates fix: harden editor and sync edge cases #158 (any backend error hits it), but the new throws make it much more reachable.

Suggested fix:

  • Per-asset try/catch in `sync()` that records the failure in `result` and continues.
  • Catch inside the CLI scheduler loop so watch mode logs and keeps running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-to-implementBehavior and scope are clear; ready for anyone to pick up and implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions