Skip to content

Commit

Permalink
fix: wrap site.save() in try-catch block (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiscafusca authored Mar 5, 2025
1 parent 207a5ee commit b23066e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/support/slack/commands/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,14 @@ function OnboardCommand(context) {
}

site.setConfig(Config.toDynamoItem(siteConfig));
await site.save();
try {
await site.save();
} catch (error) {
log.error(error);
reportLine.errors = error.message;
reportLine.status = 'Failed';
return reportLine;
}

for (const importType of importTypes) {
/* eslint-disable no-await-in-loop */
Expand Down

0 comments on commit b23066e

Please sign in to comment.