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

Closed
opened 2024-05-06 23:51:30 +02:00 by vertyco · 1 comment
vertyco commented 2024-05-06 23:51:30 +02:00 (Migrated from github.com)

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

### 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](https://github.com/Cog-Creators/Red-DiscordBot/assets/58824393/0da6de6c-2c9b-4353-849b-bec0a8a36bc9) ![image](https://github.com/Cog-Creators/Red-DiscordBot/assets/58824393/f84ff24f-f2f6-4fdb-af3d-1706ff5de30c) 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
Zephyrkul commented 2024-05-06 23:54:47 +02:00 (Migrated from github.com)

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.

> ### 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 in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6374
No description provided.