Repository navigation
fix: retry OBS downloads on 404 and handle media failures gracefully - #73
Merged
Merged
Conversation
This was referenced Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Please see: https://github.com/clins1994/matrix-line-messenger/pull/2 for more information
Closes #71
Problem (before)
flowchart TD A[Bundle of photos sent on LINE] --> B[Bridge receives multiple messages] B --> C[Download media from OBS for each] C --> D{OBS response?} D -->|200 OK| E[Media bridged successfully] D -->|202 Processing| F[Retry up to 5x with 2s delay] D -->|404 Not Found| G[Immediate hard error] G --> H[fmt.Errorf returned] H --> I[Entire message dropped] I --> J[User never sees the photo on Beeper] F -->|Eventually 200| E F -->|Still 202| H style G fill:#e76f51,color:#fff style I fill:#e76f51,color:#fff style J fill:#e76f51,color:#fffRoot cause: LINE's OBS returns transient 404s for recently uploaded media (race condition between upload confirmation and storage propagation). The bridge treated 404 as a permanent failure. When any single download in a bundle failed, the entire message was dropped with no trace on Beeper.
Solution (after)
flowchart TD A[Bundle of photos sent on LINE] --> B[Bridge receives multiple messages] B --> C[Download media from OBS for each] C --> D{OBS response?} D -->|200 OK| E[Media bridged successfully] D -->|202 Processing| F[Retry up to 5x with 2s delay] D -->|404 Not Found| F F -->|Eventually 200| E F -->|Still failing| G[Send placeholder message] G --> H["[Image unavailable — LINE media expired before it could be bridged]"] H --> I[User sees the placeholder on Beeper] E --> J[User sees the photo on Beeper] style E fill:#2d6a4f,color:#fff style J fill:#2d6a4f,color:#fff style I fill:#e9c46a,color:#000Two improvements:
Test plan
🤖 Generated with Claude Code