async fn cleanup_on_error<E, C>(
partial_path: Option<&PathBuf>,
request_id: &str,
registry: &TransferRegistryHandle,
lock_registry: &LockRegistry,
lock_id: &LockId,
channel: &E,
error: AppError,
log: &NotificationLogHandle,
os_notifier: &OsNotifier<C>,
)where
E: EventEmitter,
C: OsNotifyChannel,Expand description
Error path: delete .partial (if any), emit Failed, release lock.