No error stack trac

ERROR] 18:56:44 DiscordAPIError[10004]: Unknown Guild
DiscordAPIError[10004]: Unknown Guild
at SequentialHandler.runRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:498:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
at REST.request (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
at GuildManager.fetch (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/managers/GuildManager.js:273:20) {
requestBody: { files: undefined, json: undefined },
rawError: { message: 'Unknown Guild', code: 10004 },
code: 10004,
status: 404,
method: 'GET',
url: 'https://discord.com/api/v10/guilds/1084146148656300165?with_counts=true'
}
ERROR] 18:56:44 DiscordAPIError[10004]: Unknown Guild
DiscordAPIError[10004]: Unknown Guild
at SequentialHandler.runRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:498:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
at REST.request (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
at GuildManager.fetch (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/managers/GuildManager.js:273:20) {
requestBody: { files: undefined, json: undefined },
rawError: { message: 'Unknown Guild', code: 10004 },
code: 10004,
status: 404,
method: 'GET',
url: 'https://discord.com/api/v10/guilds/1084146148656300165?with_counts=true'
}
` Any idea why it is not giving me the error trace from which file the error comes ? Promise is correctly resolved
8 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Kumar
KumarOP•2y ago
i await the promise... it is, when i comment it no error is caused oh found it, i didnt await it inside my handler: bot.on(event.name, event.run); thanks ! correctly is bot.on(event.name, async () => await event.run()); so it wasnt correctly resolved inside the handler but inside the event it was 😄 bot.on(event.name, async (...args) => await event.run(bot, ...args)); good eye still same problem mhmm
Kumar
KumarOP•2y ago
DiscordAPIError[10004]: Unknown Guild
at SequentialHandler.runRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:498:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
at REST.request (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
at GuildManager.fetch (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/managers/GuildManager.js:273:20)
[ERROR] 19:19:45 DiscordAPIError[10004]: Unknown Guild
DiscordAPIError[10004]: Unknown Guild
at SequentialHandler.runRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:498:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
at REST.request (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
at GuildManager.fetch (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/managers/GuildManager.js:273:20)
[ERROR] 19:19:45 DiscordAPIError[10004]: Unknown Guild
Kumar
KumarOP•2y ago
--- @qjuh I now tried to debug it...
bot.on("ready", async () => await bot.guilds.fetch(buddies_DEVSERVER));
// bot.on(event.name, async (...args) => await event.run(bot, ...args));
bot.on("ready", async () => await bot.guilds.fetch(buddies_DEVSERVER));
// bot.on(event.name, async (...args) => await event.run(bot, ...args));
Still doesnt give the stack trace i didnt set any limit (using throw Error also gives full trace) which value to log ? Error doesnt have this prop
Kumar
KumarOP•2y ago
it doesnt produce the whole stack, its only with using fetch in discord.js
Kumar
KumarOP•2y ago
code is looking fine promise resolved
Kumar
KumarOP•2y ago
Kumar
KumarOP•2y ago
Error.stackTraceLimit 16 its about that it doesnt trace where the error comes, not about fetching it ^^ same goes for fetching channels sorry its 10 😄 my eyes
bot.on("ready", async () => await bot.guilds.fetch("123"));
bot.on("ready", async () => await bot.guilds.fetch("123"));
` this code should normaly give the stack trace but i just get
DiscordAPIError[10004]: Unknown Guild
at SequentialHandler.runRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:498:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
at REST.request (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
at GuildManager.fetch (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/managers/GuildManager.js:273:20)
[ERROR] 19:42:40 DiscordAPIError[10004]: Unknown Guild
DiscordAPIError[10004]: Unknown Guild
at SequentialHandler.runRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:498:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
at REST.request (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
at GuildManager.fetch (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/managers/GuildManager.js:273:20)
[ERROR] 19:42:40 DiscordAPIError[10004]: Unknown Guild
bot.on("ready", async () => {
throw Error("something broken");
});
bot.on("ready", async () => {
throw Error("something broken");
});
this on the other hand outputs:
Error: something broken
at DiscordBot.<anonymous> (/Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:143:15)
at Generator.next (<anonymous>)
at /Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:4:12)
at DiscordBot.<anonymous> (/Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:142:34)
at DiscordBot.emit (node:events:525:35)
at WebSocketManager.triggerClientReady (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketManager.js:385:17)
at WebSocketManager.checkShardsReady (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketManager.js:368:10)
at WebSocketShard.<anonymous> (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketManager.js:194:14)
at WebSocketShard.emit (node:events:513:28)
at WebSocketShard.checkReady (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketShard.js:520:12)
Error: something broken
at DiscordBot.<anonymous> (/Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:143:15)
at Generator.next (<anonymous>)
at /Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:4:12)
at DiscordBot.<anonymous> (/Users/kevinkumar/Downloads/tmsbuddies/apps/discord/src/DiscordBots/classes/Client.ts:142:34)
at DiscordBot.emit (node:events:525:35)
at WebSocketManager.triggerClientReady (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketManager.js:385:17)
at WebSocketManager.checkShardsReady (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketManager.js:368:10)
at WebSocketShard.<anonymous> (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketManager.js:194:14)
at WebSocketShard.emit (node:events:513:28)
at WebSocketShard.checkReady (/Users/kevinkumar/Downloads/tmsbuddies/node_modules/discord.js/src/client/websocket/WebSocketShard.js:520:12)
where it points correctly to my file
Want results from more Discord servers?
Add your server