Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check responding to autocomplete interaction: 400 Bad Request - Value must be one of {8}. #6374

Closed
vertyco opened this issue May 6, 2024 · 1 comment · Fixed by #6375
Closed
Labels
Status: Needs Triage This has not been labeled or discussed for handling yet. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.

Comments

@vertyco
Copy link
Contributor

vertyco commented May 6, 2024

What Red version are you using?

3.5.9

What were you trying to do?

Presumably get autocomplete results for something

What did you expect to happen?

The results to come through properly

What actually happened?

The exception seems like it was handled and just logged to sentry, although i'm not certain as I cant seem to repro it on purpose.

How can we reproduce this error?

I am not sure how to repro this error, it has occurred 19 times within the last 30 days during which i was unaware.

Anything else?

Raw Stack Trace

HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In type: Value must be one of {8}.
  File "discord/app_commands/tree.py", line 1089, in wrapper
    await self._call(interaction)
  File "discord/app_commands/tree.py", line 1210, in _call
    if not await self.interaction_check(interaction):
  File "redbot/core/tree.py", line 344, in interaction_check
    await interaction.response.send_message(
  File "discord/interactions.py", line 801, in send_message
    await adapter.create_interaction_response(
  File "discord/webhook/async_.py", line 221, in request
    raise HTTPException(response, data)

Breadcrumbs

image

image

Some insight from Zeph: check is responding to an autocomplete interaction, which only supports APPLICATION_COMMAND_AUTOCOMPLETE_RESULT (internally represented by the value 8 to Discord's API) responses

@vertyco vertyco added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label May 6, 2024
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label May 6, 2024
@Zephyrkul
Copy link
Contributor

How can we reproduce this error?

I am not sure how to repro this error, it has occurred 19 times within the last 30 days during which i was unaware.

Presumably, based on this traceback, one could reproduce it by ignoring a channel or guild then attempting to use an app command that has autocomplete in that ignored channel or guild. I haven't tested this myself, yet, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage This has not been labeled or discussed for handling yet. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants