Skip to content

Commit

Permalink
updating error catch
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaScales committed Jan 30, 2024
1 parent 829f52a commit b0880e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/commands/cms/reactModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports.handler = async options => {
);
}
} catch (e) {
if (e.cause.code === 'ERR_BAD_REQUEST') {
if (e.cause && e.cause.code === 'ERR_BAD_REQUEST') {
logger.error(i18n(`${i18nKey}.errors.invalidName`));
} else {
logger.error(e);
Expand Down

0 comments on commit b0880e6

Please sign in to comment.