Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions apps/cli/commands/site/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,17 @@ export async function runCommand(
);

await updateServerFiles();
logger.reportSuccess( __( 'Dependencies up to date' ) );
}
} catch ( error ) {
// Swallow errors in production. They aren't critical and likely relate to things outside the
// user's control, like network issues or bad API responses.
// Errors here aren't critical and likely relate to things outside the user's control,
// like network issues or bad API responses. Report them in development, and silently
// clear the spinner in production so creation can continue.
if ( process.env.NODE_ENV !== 'production' ) {
const loggerError = new LoggerError( 'Failed to update dependencies', error );
logger.reportError( loggerError );
logger.reportError( loggerError, false );
} else {
logger.reportSuccess( __( 'Dependencies up to date' ), true );
}
}

Expand Down
Loading