Debug: Catch and print errors when fetching from Jose

This commit is contained in:
2023-07-31 15:53:30 +02:00
committed by Minz
parent d7a99968bc
commit 0c232a55cb

View File

@@ -220,7 +220,11 @@ module.exports = {
})
for (let index = 0; index < 5; 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);
}
break;