Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mod] userinfo Invalid Form Body in role section (to many characters) #2910

Closed
CGDoctor8 opened this issue Jul 31, 2019 · 1 comment · Fixed by #2971
Closed

[Mod] userinfo Invalid Form Body in role section (to many characters) #2910

CGDoctor8 opened this issue Jul 31, 2019 · 1 comment · Fixed by #2971
Labels
Status: In Progress Type: Bug

Comments

@CGDoctor8
Copy link

@CGDoctor8 CGDoctor8 commented Jul 31, 2019

Command bugs

Command name

userinfo

What cog is this command from?

mod

What were you expecting to happen?

for userinfo to output the info of the user

What actually happened?

an error

Exception in command 'userinfo'
Traceback (most recent call last):
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/redbot/cogs/mod/names.py", line 164, in userinfo
    await ctx.send(embed=data)
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/redbot/core/commands/context.py", line 64, in send
    return await super().send(content=content, **kwargs)
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/discord/abc.py", line 823, in send
    data = await state.http.send_message(channel.id, content, tts=tts, embed=embed, nonce=nonce)
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/discord/http.py", line 222, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In embed.fields.2.value: Must be 1024 or fewer in length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
    await ctx.command.invoke(ctx)
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/redbot/.pyenv/versions/redbot/lib/python3.7/site-packages/discord/ext/commands/core.py", line 88, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In embed.fields.2.value: Must be 1024 or fewer in length.

How can we reproduce this issue?

  1. Create a cancerous amount of roles (50)
  2. Give all roles to desired user
  3. Get userinfo from that user
Images

image
image
image
image

@Flame442 Flame442 added the Type: Bug label Aug 4, 2019
@mikeshardmind
Copy link
Contributor

@mikeshardmind mikeshardmind commented Aug 30, 2019

Oh boy. Rather than attempt embed pagination, I think there's a certain point where it's acceptable to tell the server owner we wont support displaying that many roles in user info.

@mikeshardmind mikeshardmind added the Status: In Progress label Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants