CerealYT
CerealYT
DIAdiscord.js - Imagine an app
Created by CerealYT on 4/9/2025 in #djs-questions
DiscordAPIError[50035]: Invalid Form Body
Im Always getting the same error and i dont know how to fix it the goal was that the numerial buttons always adapt to the number of pages that have the category Error:
C:.......\node_modules\@discordjs\rest\dist\index.js:727
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[50035]: Invalid Form Body
data.embeds[0][LIST_ITEM_VALUE_REQUIRED]: List item values of ModelType are required
at handleErrors (C......\node_modules\@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async BurstHandler.runRequest (C......\node_modules\@discordjs\rest\dist\index.js:831:23)
at async _REST.request (C.......\node_modules\@discordjs\rest\dist\index.js:1272:22)
at async ButtonInteraction.update (C.......\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:355:22)
at async InteractionCollector.<anonymous> (C......\Documents\spacecat\help.js:244:7) {
requestBody: {
files: [
{
data: Buffer(268050) [Uint8Array] [
137, 80, 78, 71, 13, 10, 26, 10, 0,
0, 0, 13,
73, 72, 68, 82, 0, 0, 2, 222, 0,
0, 1, 53,
8, 6, 0, 0, 0, 208, 255, 231, 131,
0, 0, 0,
9, 112, 72, 89, 115, 0, 0, 46, 35,
0, 0, 46,
35, 1, 120, 165, 63, 118, 0, 0, 3,
90, 105, 84,
88, 116, 88, 77, 76, 58, 99, 111, 109,
46, 97, 100,
111, 98, 101, 46, 120, 109, 112, 0, 0,
0, 0, 0,
60, 63, 120, 112, 97, 99, 107, 101, 116,
32, 98, 101,
103, 105, 110, 61,
... 267950 more items
],
name: 'space_cat_help.png',
contentType: undefined
}
],
json: {
type: 7,
data: {
content: undefined,
tts: false,
nonce: undefined,
enforce_nonce: false,
embeds: [ undefined ],
components: [
{ type: 1, components: [Array] },
{ type: 1, components: [Array] }
],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: [ { id: '0', description: undefined } ],
sticker_ids: undefined,
thread_name: undefined,
applied_tags: undefined,
poll: undefined
}
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: {
data: { embeds: { '0': { _errors: [Array] } } }
}
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1359482513046769784/aW50ZXJhY3Rpb246MTM1OTQ4MjUxMzA0Njc2OTc4NDpxQWdwemp3aGw3eFdQcnlNbktVemVoSlZzNHR2ZTBab0pKUW5RcjNUbzNCTkZhNTVnWXRjWEpqSjU3R3V2UGVBVnk1bGJCYWI1QnF3MlUzdVhzWlZ5SlpHS2NBRTFEaTg1Uk5UNVRVcE5CalNxOWt5a0ZiMzdCTVpJdHFxeXNVdg/callback?with_response=false'
}

Node.js v22.13.1
[nodemon] app crashed - waiting for file changes before starting...
C:.......\node_modules\@discordjs\rest\dist\index.js:727
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[50035]: Invalid Form Body
data.embeds[0][LIST_ITEM_VALUE_REQUIRED]: List item values of ModelType are required
at handleErrors (C......\node_modules\@discordjs\rest\dist\index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async BurstHandler.runRequest (C......\node_modules\@discordjs\rest\dist\index.js:831:23)
at async _REST.request (C.......\node_modules\@discordjs\rest\dist\index.js:1272:22)
at async ButtonInteraction.update (C.......\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:355:22)
at async InteractionCollector.<anonymous> (C......\Documents\spacecat\help.js:244:7) {
requestBody: {
files: [
{
data: Buffer(268050) [Uint8Array] [
137, 80, 78, 71, 13, 10, 26, 10, 0,
0, 0, 13,
73, 72, 68, 82, 0, 0, 2, 222, 0,
0, 1, 53,
8, 6, 0, 0, 0, 208, 255, 231, 131,
0, 0, 0,
9, 112, 72, 89, 115, 0, 0, 46, 35,
0, 0, 46,
35, 1, 120, 165, 63, 118, 0, 0, 3,
90, 105, 84,
88, 116, 88, 77, 76, 58, 99, 111, 109,
46, 97, 100,
111, 98, 101, 46, 120, 109, 112, 0, 0,
0, 0, 0,
60, 63, 120, 112, 97, 99, 107, 101, 116,
32, 98, 101,
103, 105, 110, 61,
... 267950 more items
],
name: 'space_cat_help.png',
contentType: undefined
}
],
json: {
type: 7,
data: {
content: undefined,
tts: false,
nonce: undefined,
enforce_nonce: false,
embeds: [ undefined ],
components: [
{ type: 1, components: [Array] },
{ type: 1, components: [Array] }
],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: [ { id: '0', description: undefined } ],
sticker_ids: undefined,
thread_name: undefined,
applied_tags: undefined,
poll: undefined
}
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: {
data: { embeds: { '0': { _errors: [Array] } } }
}
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1359482513046769784/aW50ZXJhY3Rpb246MTM1OTQ4MjUxMzA0Njc2OTc4NDpxQWdwemp3aGw3eFdQcnlNbktVemVoSlZzNHR2ZTBab0pKUW5RcjNUbzNCTkZhNTVnWXRjWEpqSjU3R3V2UGVBVnk1bGJCYWI1QnF3MlUzdVhzWlZ5SlpHS2NBRTFEaTg1Uk5UNVRVcE5CalNxOWt5a0ZiMzdCTVpJdHFxeXNVdg/callback?with_response=false'
}

Node.js v22.13.1
[nodemon] app crashed - waiting for file changes before starting...
5 replies