Debug: Catch and print errors when fetching from Jose

This commit is contained in:
2023-07-31 15:53:30 +02:00
parent e2dab416f2
commit 44eb1783ac

View File

@@ -220,7 +220,11 @@ module.exports = {
}) })
for (let index = 0; index < 5; index++) { for (let index = 0; index < 5; index++) {
testCard.printNr = index; testCard.printNr = index;
let render = await Rendering.renderCard(testCard, testCharacter).catch(function(error){interaction.channel.send(JSON.stringify(error))}); let render = await Rendering.renderCard(testCard, testCharacter).catch(async function(error){
await interaction.channel.send(JSON.stringify(error));
await interaction.channel.send(JSON.stringify(error.response?.data));
return;
});
await interaction.channel.send(render); await interaction.channel.send(render);
} }
break; break;