Skip to content

fix: improve gateway intents and auth error messages#328

Open
masami-agent wants to merge 1 commit intoopenabdev:mainfrom
masami-agent:fix/gateway-intents-error-message
Open

fix: improve gateway intents and auth error messages#328
masami-agent wants to merge 1 commit intoopenabdev:mainfrom
masami-agent:fix/gateway-intents-error-message

Conversation

@masami-agent
Copy link
Copy Markdown
Contributor

Summary

Closes #116

Catch DisallowedGatewayIntents and InvalidAuthentication errors from the Discord gateway with actionable error messages instead of cryptic serenity errors that cause CrashLoopBackOff with no guidance.

Changes

File Change
src/main.rs Replace bare client.start().await? with match block catching DisallowedGatewayIntents and InvalidAuthentication
README.md Add prerequisites section documenting required Discord Developer Portal settings

Error messages

DisallowedGatewayIntents:

Discord rejected privileged intents. Enable MESSAGE CONTENT INTENT at: https://discord.com/developers/applications → Bot → Privileged Gateway Intents

InvalidAuthentication:

Discord rejected bot token. Verify your bot_token in config.toml is correct and has not been reset.

What is NOT changed

Per discussion in #116:

  • Intents are not made configurable in config.toml — openab requires MESSAGE_CONTENT to function
  • Only the two most common DX footguns are caught — not every possible serenity error

Testing

Catch DisallowedGatewayIntents and InvalidAuthentication errors from
Discord gateway with actionable error messages instead of cryptic
serenity errors.

Add prerequisites section to README documenting required Discord
Developer Portal settings.

Closes openabdev#116
@masami-agent masami-agent requested a review from thepagent as a code owner April 14, 2026 12:22
@thepagent thepagent added the p2 Medium — planned work label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2 Medium — planned work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardcoded privileged gateway intents cause CrashLoopBackOff with no actionable error message

2 participants