fix(engine): silence benign UnsupportedPlatform warn on exit
CI / Test & Lint (push) Failing after 4s
CI / Release Build (push) Has been skipped

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:
funman300
2026-05-01 18:04:56 +00:00
parent ab1d098877
commit 9a9026e33a
+12 -4
View File
@@ -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}");
}
} }
} }