[Audio] Track Error report too long #6794

Closed
opened 2026-07-25 22:27:56 +02:00 by aikaterna · 2 comments
aikaterna commented 2026-07-25 22:27:56 +02:00 (Migrated from github.com)

What Red version are you using?

3.5.24

What were you trying to do?

Catch errors in audio's playback.

What did you expect to happen?

An embed message in the channel with the traceback received from the Lavalink process.

What actually happened?

Some of these messages are too long.

[21:27:48] ERROR    [asyncio] Task exception was never retrieved
future: <Task finished name='Task-2070327' coro=<LavalinkEvents.lavalink_event_handler() done, defined at /Users/aikaterna/red311/lib/python3.11/site-packages/redbot/cogs/audio/core/events/lavalink.py:30> exception=HTTPException('400 Bad Request (error code: 50035): Invalid Form Body\nIn embeds.0.description: Must be 4096 or fewer in length.')>
Traceback (most recent call last):
  File "/Users/aikaterna/red311/lib/python3.11/site-packages/redbot/cogs/audio/core/events/lavalink.py", line 333, in lavalink_event_handler
    await message_channel.send(embed=embed)
  File "/Users/aikaterna/red311/lib/python3.11/site-packages/discord/abc.py", line 1706, in send
    data = await state.http.send_message(channel.id, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aikaterna/red311/lib/python3.11/site-packages/discord/http.py", line 778, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.description: Must be 4096 or fewer in length.

How can we reproduce this error?

  1. Run an instance with audio and a source that provides a long traceback.
  2. Wait for an occurrence.
  3. Observe the traceback.
    ...

Anything else?

I feel that this output could be shortened to a visually reasonable size and perhaps even prompt the user to retrieve their spring.log for more information, without being too overwhelming or wordy. Some services might benefit from an reasonably-sized traceback being able to be shown (2000-4000 characters). This issue could also be remedied by something as simple as a index range on the description while its being constructed in the embed.

### What Red version are you using? 3.5.24 ### What were you trying to do? Catch errors in audio's playback. ### What did you expect to happen? An embed message in the channel with the traceback received from the Lavalink process. ### What actually happened? Some of these messages are too long. ``` [21:27:48] ERROR [asyncio] Task exception was never retrieved future: <Task finished name='Task-2070327' coro=<LavalinkEvents.lavalink_event_handler() done, defined at /Users/aikaterna/red311/lib/python3.11/site-packages/redbot/cogs/audio/core/events/lavalink.py:30> exception=HTTPException('400 Bad Request (error code: 50035): Invalid Form Body\nIn embeds.0.description: Must be 4096 or fewer in length.')> Traceback (most recent call last): File "/Users/aikaterna/red311/lib/python3.11/site-packages/redbot/cogs/audio/core/events/lavalink.py", line 333, in lavalink_event_handler await message_channel.send(embed=embed) File "/Users/aikaterna/red311/lib/python3.11/site-packages/discord/abc.py", line 1706, in send data = await state.http.send_message(channel.id, params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/aikaterna/red311/lib/python3.11/site-packages/discord/http.py", line 778, in request raise HTTPException(response, data) discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.description: Must be 4096 or fewer in length. ``` ### How can we reproduce this error? 1. Run an instance with audio and a source that provides a long traceback. 2. Wait for an occurrence. 3. Observe the traceback. ... ### Anything else? I feel that this output could be shortened to a visually reasonable size and perhaps even prompt the user to retrieve their spring.log for more information, without being too overwhelming or wordy. Some services might benefit from an reasonably-sized traceback being able to be shown (2000-4000 characters). This issue could also be remedied by something as simple as a index range on the description while its being constructed in the embed.
Jackenmen commented 2026-11-12 12:10:34 +01:00 (Migrated from github.com)

I think we should just truncate it with a clear indication that it was truncated (... might not necessarily be clear enough as it could maybe be mistaken for part of the error).
A regular user won't get much value out of incredibly lengthy errors that would end up going over the length limit and the bot owner can see the whole error in spring.log anyway.

I think we should just truncate it with a clear indication that it was truncated (`...` might not necessarily be clear enough as it could maybe be mistaken for part of the error). A regular user won't get much value out of incredibly lengthy errors that would end up going over the length limit and the bot owner can see the whole error in spring.log anyway.
Owner

Fixed by #6827, which has been merged into V3/develop.

Fixed by #6827, which has been merged into V3/develop.
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
2 participants
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#6794
No description provided.