Skip to content

Commit

Permalink
fix: wrap site.save() in try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
fiscafusca committed Mar 5, 2025
1 parent 634098e commit 2f74186
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 @@ -185,7 +185,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 2f74186

Please sign in to comment.