Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Handle no content also being an empty string and not just None #76

Open
sentry-io bot opened this issue Jul 29, 2021 · 0 comments
Open

Handle no content also being an empty string and not just None #76

sentry-io bot opened this issue Jul 29, 2021 · 0 comments
Assignees
Labels
bug Something isn't working priority This needs to be fixed / implemented above others

Comments

@sentry-io
Copy link

sentry-io bot commented Jul 29, 2021

It's possible, with a combination of embeds, for the content to be "" (empty content). This causes discord to error when sending the embed.

Sentry Issue: MESSAGE-MANAGER-BOT-1

HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields.2.value: This field is required
  File "discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/admin/bot/message-bot/cogs/messages.py", line 520, in edit
    success = await confirm(
  File "/home/admin/bot/message-bot/cogs/messages.py", line 102, in confirm
    msg_id = await send_message_components(
  File "src/interactions.py", line 621, in send_message_components
    response = await state.http.request(r, json=payload)
  File "discord/http.py", line 254, in request
    raise HTTPException(r, data)

CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields.2.value: This field is required
  File "discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc

Ignoring exception in command edit:
@AnotherCat AnotherCat added bug Something isn't working priority This needs to be fixed / implemented above others labels Jul 29, 2021
@AnotherCat AnotherCat moved this to Todo in Master Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working priority This needs to be fixed / implemented above others
Projects
No open projects
Status: Todo
Development

No branches or pull requests

1 participant