Skip to content

Commit

Permalink
fix: improve error feedback for chromium instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirasaki committed Aug 5, 2024
1 parent 14abd3e commit a2a2e71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/dayz/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ module.exports = new ChatInputCommand({

// Dedicated function for stat calculations
// and sending the result to reduce cognitive complexity
const ctx = await playerStatisticsCtx(serverCfg, data);
let ctx;
try {
ctx = await playerStatisticsCtx(serverCfg, data);
}
catch (err) {
interaction.editReply('An error occurred while processing the player\'s statistics. This is most likely an issue with the Chromium browser. Please try again later, or disable "STATISTICS_INCLUDE_ZONES_HEATMAP" in the server configuration.');
}

// Sending our detailed player information
interaction.editReply(ctx);
Expand Down

0 comments on commit a2a2e71

Please sign in to comment.