satisfactorymodding / satisfactorymodding/FICSIT-Fred
No handling for embed too large
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields.0.value: Must be 1024 or fewer in length.
File "/app/venv/lib/python3.12/site-packages/nextcord/client.py", line 527, in _run_event
await coro(*args, **kwargs)
File "/app/fred/fred.py", line 321, in on_message
_reacted = await self.Crashes.process_message(message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/fred/cogs/crashes.py", line 406, in process_message
await self.bot.reply_to_msg(message, embed=embed, propagate_reply=False, files=resp_files)
File "/app/fred/fred.py", line 256, in reply_to_msg
return await self.safe_send(message.channel, content, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/fred/fred.py", line 224, in safe_send
return await chan.send(content, files=files, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/nextcord/abc.py", line 1528, in send
data = await state.http.send_files(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/nextcord/http.py", line 911, in request
should_retry = await self._handle_http_response_errors(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/nextcord/http.py", line 1086, in _handle_http_response_errors
raise HTTPException(response, return_value)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in fred.py around safe_send and reply_to_msg, then trace the crash handling call in cogs/crashes.py around process_message. Reproduce the reported Discord error with an embed field over 1024 characters and determine the expected fallback from the surrounding handling. Done means oversized embed content no longer produces the reported Invalid Form Body failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100