Skip to content

Retry Threads text posts when the container is not found - #352

Closed
paulocastellano wants to merge 1 commit into
mainfrom
cursor/threads-text-container-retry-5038
Closed

Retry Threads text posts when the container is not found#352
paulocastellano wants to merge 1 commit into
mainfrom
cursor/threads-text-container-retry-5038

Conversation

@paulocastellano

Copy link
Copy Markdown
Contributor

Nightwatch caught ThreadsMediaContainerNotFoundException on PublishToSocialPlatform (social-threads, 1.8s). The stack is publishTextPostpublishContainer — a text-only post, no media.

Graph 24 / 4279009 (“Media Not Found” / “The media with id … cannot be found”) is a known Threads race on threads_publish. Meta’s community reports it for text as well as images. Image, video, and carousel already recreate the container up to 3 times. Text did not, so the first miss became a hard fail and a generic Nightwatch message (Logs: Not captured).

What changed

  • Text posts use the same publishWithRetry path as media.
  • When all retries fail, Nightwatch’s exception message includes container_id, code=24, error_subcode=4279009, and Graph error_user_msg.
  • userMessage (and therefore the email) stays Threads could not find the processed media. Please try again.

Unchanged

  • User-facing copy.
  • In-flight retries stay Log::warning; the job still report()s only the terminal SocialPublishException.
Open in Web Open in Cursor 

Graph 24/4279009 on threads_publish is a known race for TEXT as well
as media. Image, video, and carousel already recreated the container;
text failed on the first hit and Nightwatch only stored the generic
user message. Text now uses the same retry, and the exception message
carries container_id plus Graph error_user_msg without changing the
email copy.

Co-authored-by: Paulo Castellano <hello@paulocastellano.com>
@paulocastellano
paulocastellano marked this pull request as ready for review September 11, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants