Skip to content

Commit

Permalink
Added error logging to prepareAndGenerateBot
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomp committed Dec 21, 2024
1 parent b7f082c commit 16da785
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions project/src/generators/BotGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export class BotGenerator {
? preparedBotBase.Info.Side // Use side to get usec.json or bear.json when bot will be PMC
: botGenerationDetails.role;
const botJsonTemplateClone = this.cloner.clone(this.botHelper.getBotTemplate(botRole));
if (!botJsonTemplateClone) {
this.logger.error(`Unable to retrieve: ${botRole} bot template, cannot generate bot of this type`);
}

return this.generateBot(sessionId, preparedBotBase, botJsonTemplateClone, botGenerationDetails);
}
Expand Down

0 comments on commit 16da785

Please sign in to comment.