Skip to content

Arearestrictions exceeds embed limits causing crash. #617

@jepke

Description

@jepke

When there is a long list of matched areas and discord logging is enabled. It exceeds the max lenght of 1024 on the discord embed resulting in a crash of Reactmap upon login.

/home/node/node_modules/discord.js/src/rest/RequestHandler.js:154
      throw new DiscordAPIError(request.path, data, request.method, res.status);
            ^
DiscordAPIError: Invalid Form Body
embed.fields[15].value: Must be 1024 or fewer in length.
embeds[0].fields[15].value: Must be 1024 or fewer in length.
    at RequestHandler.execute (/home/node/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/node/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
  method: 'post',
  path: '/channels/#############/messages',
  code: 50035,
  httpStatus: 400
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions