Skip to content

fix(mastodon): skip a run when the instance returns a 5xx - #226

Merged
lens0021 merged 1 commit into
mainfrom
claude/project-thread-jfk5us
Oct 20, 2026
Merged

lens0021 merged 1 commit into
mainfrom
claude/project-thread-jfk5us

Conversation

@lens0021

Copy link
Copy Markdown
Member

Requested by lens0021 · project thread

Before: when mastodon.social answers with a 5xx, mastodon-discord and mastodon-boost fail the invocation. On 2026-10-20 between 07:13Z and 07:20Z it returned 503 Service Unavailable, giving 5 + 3 errors (MastodonServiceUnavailableError from GET /api/v1/notifications) and tripping the "Lambda Errors" alarm.

After: a 5xx is handled like a timeout (#220): the run is skipped with a log line and the next run picks up from the cursor.

How: catch MastodonServerError (500/502/503/504) next to MastodonNetworkError in both handlers, with a test each. The cursor is only written per handled mention, so nothing is lost.


Generated by Claude Code

mastodon.social answered 503 for a few minutes on 2026-10-20 and both
Mastodon functions failed, which tripped the Lambda Errors alarm. Treat
server errors like timeouts: the next run picks up from the cursor.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GNvt1QTR2gkHnre3WTdrcK
@lens0021 lens0021 self-assigned this Oct 20, 2026
@lens0021
lens0021 merged commit 0ffb10b into main Oct 20, 2026
10 checks passed
@lens0021
lens0021 deleted the claude/project-thread-jfk5us branch October 20, 2026 13:44
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