From 93df743559a95f0bf9599fb2d94f8c4b5d9bd248 Mon Sep 17 00:00:00 2001 From: anime Date: Tue, 8 Jul 2025 15:37:59 +0800 Subject: [PATCH] feat(algolia): replace error throw with console.error for missing config Change error handling from throwing an exception to logging an error when Algolia configuration is missing. This provides better error reporting without breaking the application flow. --- lib/plugins/algolia.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/algolia.js b/lib/plugins/algolia.js index 439451f1..2421d142 100644 --- a/lib/plugins/algolia.js +++ b/lib/plugins/algolia.js @@ -13,7 +13,7 @@ const initAlgolia = () => { !BLOG.ALGOLIA_ADMIN_APP_KEY || !BLOG.ALGOLIA_INDEX ) { - throw new Error('Algolia configuration is missing') + console.error('Algolia configuration is missing') } algoliaClient = algoliasearch( BLOG.ALGOLIA_APP_ID,