Put Instagram Graph status on still-processing exceptions - #351
Closed
paulocastellano wants to merge 2 commits into
Closed
Put Instagram Graph status on still-processing exceptions#351paulocastellano wants to merge 2 commits into
paulocastellano wants to merge 2 commits into
Conversation
Nightwatch only stores class/message/stack, so a 15-minute IN_PROGRESS poll ended as "still processing container" with no Graph payload. The exception message now includes status_code and status, and a Graph status that is only "Error: …" fails immediately instead of burning the retry budget. Co-authored-by: Paulo Castellano <hello@paulocastellano.com>
Event::fake() swallows MessageLogged, so Log::listen never saw the warning. Fake only PostPlatformStatusUpdated. Co-authored-by: Paulo Castellano <hello@paulocastellano.com>
paulocastellano
marked this pull request as ready for review
September 11, 2026 18:31
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.
Nightwatch caught
PlatformUnavailableException: Instagram is still processing container 18630170011019893onPublishToSocialPlatform(335ms,social-instagram). That is the retry-exhausted path — Instagram stayed non-terminal for the whole poll budget (~90 × 10s). Nightwatch Exceptions only stores class/message/stack, and this exception view had Logs: Not captured, so Graphstatus_code/statusnever appeared.This change puts that payload on the exception itself so the next Nightwatch hit is readable without the log channel.
What changed
status_codeandstatus(e.g.… (status_code=IN_PROGRESS, status=In progress: Media is still being processed.)).instagram_status_detailis stored on the checkpoint next toinstagram_status.status: "Error: Media download has failed…"(emptystatus_code), we fail immediately as media-processing-failed instead of burning 15 minutes of retries.Publish rescheduled: platform unavailablewarnings now includecontent_typeand the media snapshot.Unchanged
posts.errors.platform_unavailable/platform_unavailable_exhausted/Instagram media processing failed).Log::warningonly;report()still happens only when retries are exhausted.After deploy, the Nightwatch exception message should carry the Graph status even when Logs stay empty.