500 on editing thread parent interaction reply

Hey there. I'm getting Internal Server Errors when attempting to edit an interaction response that is now the parent message of a thread. The edit still goes through, but the server responds with a 500 nonetheless. The issue only started happening today, so I initially thought it was a Discord-side issue, but nobody else seems to be reporting this issue. It seems that simply catching the error and ignoring it restores normal functionality, but this is obviously not ideal. Does anyone know what's going on? Here's an abridged version of what I'm doing that's causing the issue:
let parent = (await interaction.fetchReply()) as Message;
let thread = await interaction.channel.threads.create({
name: ...,
autoArchiveDuration: options.lifetime,
type: "GUILD_PUBLIC_THREAD",
startMessage: parent as Message,
});

await thread.join();
await thread.send({ embeds: [...] });

await interaction.editReply({
content: ...,
embeds: [
{
title: ...,
footer: { text: ... },
},
],
});
let parent = (await interaction.fetchReply()) as Message;
let thread = await interaction.channel.threads.create({
name: ...,
autoArchiveDuration: options.lifetime,
type: "GUILD_PUBLIC_THREAD",
startMessage: parent as Message,
});

await thread.join();
await thread.send({ embeds: [...] });

await interaction.editReply({
content: ...,
embeds: [
{
title: ...,
footer: { text: ... },
},
],
});
4 Replies
d.js toolkit
d.js toolkit11mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers. - Issue solved? Press the button!
Tom Spander
Tom Spander11mo ago
Stack trace:
Internal Server Error
Response: Internal Server Error
at RequestHandler.execute (/.../node_modules/discord.js/src/rest/RequestHandler.js:357:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/.../node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async InteractionWebhook.editMessage (/.../node_modules/discord.js/src/structures/Webhook.js:328:15)
at async CommandInteraction.editReply (/.../node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:150:21)
Internal Server Error
Response: Internal Server Error
at RequestHandler.execute (/.../node_modules/discord.js/src/rest/RequestHandler.js:357:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/.../node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async InteractionWebhook.editMessage (/.../node_modules/discord.js/src/structures/Webhook.js:328:15)
at async CommandInteraction.editReply (/.../node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:150:21)
d4
d411mo ago
Server error means discord had an error and it isn't your fault Other than that i do not know unfortunately Maybe you should report to discord themselves?
Tom Spander
Tom Spander11mo ago
I know I shouldn't have to fix 500s, I was more asking if there's a workaround or if it's a known issue. Has been happening for about 20 hours, so I'm rather surprised it hasn't been reported by anyone yet. or maybe if someone more familiar with the internals of d.js knows which requests are being made here and which one of them fails