fix(engine): silence benign UnsupportedPlatform warn on exit
push_on_exit logged every error including LocalOnlyProvider's expected UnsupportedPlatform response, producing a misleading "sync push on exit failed" warning on every shutdown in local-only mode. Mirror the pull path: treat UnsupportedPlatform as silent no-op, warn only on real errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -248,10 +248,18 @@ fn push_on_exit(
|
|||||||
Ok(handle) => handle.block_on(provider.push(&payload)),
|
Ok(handle) => handle.block_on(provider.push(&payload)),
|
||||||
Err(_) => future::block_on(provider.push(&payload)),
|
Err(_) => future::block_on(provider.push(&payload)),
|
||||||
};
|
};
|
||||||
if let Err(e) = result {
|
match result {
|
||||||
// Log push failures on exit so they appear in crash/log reports.
|
Ok(_) => {}
|
||||||
// We cannot surface them to the UI at this point (game loop is done).
|
// `UnsupportedPlatform` is the expected response of
|
||||||
warn!("sync push on exit failed: {e}");
|
// `LocalOnlyProvider`; treat it the same as the pull path does —
|
||||||
|
// no backend configured is not a failure.
|
||||||
|
Err(SyncError::UnsupportedPlatform) => {}
|
||||||
|
Err(e) => {
|
||||||
|
// Log real push failures on exit so they appear in crash/log
|
||||||
|
// reports. We cannot surface them to the UI at this point (game
|
||||||
|
// loop is done).
|
||||||
|
warn!("sync push on exit failed: {e}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user