Edge case from the prior commits: if the publisher throws TokenExpired (401 path), PublishToSocialPlatform attempts refreshAccountToken() to recover. That internally goes through ConnectionVerifier::verify, which can now raise PlatformUnavailable (5xx). The old catch (\Throwable) swallowed it but the loop still fell through to markAsTokenExpired — meaning a transient platform outage during a retry could still flip the account to expired. Adds an explicit PlatformUnavailable catch in the retry block: marks the post failed with category platform_unavailable and breaks before touching the account status. |
||
|---|---|---|
| .. | ||
| Ai | ||
| PostHog | ||
| PublishPost.php | ||
| PublishToSocialPlatform.php | ||
| RefreshSocialToken.php | ||
| SendNotification.php | ||
| VerifyWorkspaceConnections.php | ||