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,12 +248,20 @@ fn push_on_exit(
|
||||
Ok(handle) => handle.block_on(provider.push(&payload)),
|
||||
Err(_) => future::block_on(provider.push(&payload)),
|
||||
};
|
||||
if let Err(e) = result {
|
||||
// Log 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).
|
||||
match result {
|
||||
Ok(_) => {}
|
||||
// `UnsupportedPlatform` is the expected response of
|
||||
// `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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Helpers
|
||||
|
||||
Reference in New Issue
Block a user