satisfactorymodding / satisfactorymodding/FICSIT-Fred

No handling for embed too large

Open
#203 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7
Forks
3
PR merge metrics
No merged PRs in 30d

Description

https://cdn.discordapp.com/attachments/1452137070842613884/1452140515632873615/SMMDebug-2025-12-21-03-27-43.zip?ex=6948babe&is=6947693e&hm=fe035c34c104a9f9e1c9c5bc377f4a6cfc519a9d7c71ccdcacabe600f616109a&

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.