Repository navigation
Explain a missing bot instead of returning 502 at Activity sign-in; keep log fields on GoDaddy - #56
Merged
Merged
Conversation
…without it Rogue's Community Server could launch the TypeCheck Activity, but the bot is not a member there. Sign-in then asks Discord for the guild, Discord answers 404 Unknown Guild (code 10004), and the generic mapping turned it into HTTP 502 discord_http_404, which the hosting proxy replaced with an unreadable error page. Map that 404 to bot_not_in_server (409) and an unknown member to not_a_guild_member (403), and show how to add the bot. Also prefix operational log lines with TYPECHECK_EVENT_V1: the GoDaddy log processor kept only the event and path keys of bare JSON lines, which hid the failing code and stage timings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Root cause (verified)
Activity sign-in in Rogue's Community Server returned
HTTP 502 … unreadable response. After #55 deployed, production loggedauth_stagesandhttp_errorfor/api/auth/exchangein the same millisecond, so TypeCheck itself returned the 5xx, quickly, not a proxy timeout.The bot is in only three servers (CompleteTech, Claw N Order, TypeCheck Test), not Rogue's Community Server. An Activity can be launched in a server without the bot. Sign-in then calls
GET /guilds/{id}, and Discord answers404 Unknown Guild(code 10004, reproduced read-only with the bot token against a server it is not in).DiscordRest.jsonmaps every non-401/403 Discord error to502 discord_http_<status>, and the hosting proxy replaces 502 bodies with its own page.Change
memberInfo: Unknown Guild →bot_not_in_server(409); unknown member →not_a_guild_member(403). Other Discord errors are unchanged.TYPECHECK_EVENT_V1, like the migration receipts. GoDaddy kept onlyeventandpathfrom bare JSON lines, which hid the error code and stage timings.Validation
npm run checkclean;npm test382/382 pass, including new tests against the realDiscordRest(404 guild, 404 member, 500 unchanged) and the Activity message.SHA256SUMSrefreshed and verified.🤖 Generated with Claude Code