Surface errors when post publish silently fails#22652
Conversation
Add a toast when publishPost() is called without network connectivity, so the user sees feedback instead of the publish silently doing nothing. Add warning log when PostUploadHandler receives an OnPostUploaded event for a post that is no longer tracked as uploading, including any error details that would otherwise be silently dropped. Ref: CMM-1297 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
Turns out this work might overlap with #22656 – if so, it can be closed @nbradbury. |
|
This is odd. Publish action is not working for me at all. And if I go offline, I'm not seeing the toast or the log... Screen_recording_20260305_105846.mp4Only POST log line
|
In this situation I don't see the "no network" toast - instead I'm returned to the post list, with a snackbar saying the post will be published when the device is online. Screen_recording_20260305_111233.mp4 |
Sorry, I missed that! @adalpari and I chatted about the overlap this morning and I ended up closing my PR in lieu of this one. |





Summary
Investigating CMM-1297: posts intermittently stay in draft after tapping Publish with no error shown.
Two small changes to surface errors that are currently silently swallowed:
UploadUtils.publishPost(): Added anelsebranch to the existing network availability check. Previously, if the network was unavailable at the moment of publish, the upload was silently skipped with no user feedback. Now shows a "no network" toast.PostUploadHandler.onPostUploaded(): Added warning log when anOnPostUploadedevent is received for a post that is no longer tracked as the currently uploading post. Logs the post IDs involved and any error details that would otherwise be silently dropped. This will help diagnose cases where the upload response arrives but the handler state has been cleared (e.g. service killed by OS on low-memory devices).These are additive-only changes — no existing control flow is altered.
Test plan
🤖 Generated with Claude Code