Category: Cogs - AudioGood First IssueStatus: PRs WelcomeType: Bug
Repository metrics
- Stars
- (4,337 stars)
- PR merge metrics
- (Avg merge 1d 15h) (3 merged PRs in 30d)
Description
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?
- Run an instance with audio and a source that provides a long traceback.
- Wait for an occurrence.
- 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.