fix: improve gateway intents and auth error messages#328
Open
masami-agent wants to merge 1 commit intoopenabdev:mainfrom
Open
fix: improve gateway intents and auth error messages#328masami-agent wants to merge 1 commit intoopenabdev:mainfrom
masami-agent wants to merge 1 commit intoopenabdev:mainfrom
Conversation
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
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.
Summary
Closes #116
Catch
DisallowedGatewayIntentsandInvalidAuthenticationerrors from the Discord gateway with actionable error messages instead of cryptic serenity errors that cause CrashLoopBackOff with no guidance.Changes
src/main.rsclient.start().await?with match block catchingDisallowedGatewayIntentsandInvalidAuthenticationREADME.mdError messages
DisallowedGatewayIntents:
InvalidAuthentication:
What is NOT changed
Per discussion in #116:
config.toml— openab requiresMESSAGE_CONTENTto functionTesting
serenity::Error::Gateway(GatewayError::DisallowedGatewayIntents)andGatewayError::InvalidAuthenticationexist in serenity 0.12.50.7.2-beta.3(see Hardcoded privileged gateway intents cause CrashLoopBackOff with no actionable error message #116 comment)