chore: improve meili error handling

This commit is contained in:
Daniel Avila 2023-03-22 17:15:32 -04:00
parent 68979015c1
commit 655e7ce6d6
9 changed files with 182 additions and 64 deletions

View file

@ -81,7 +81,7 @@ const projectPath = path.join(__dirname, '..', '..', 'client');
let messageCount = 0;
process.on('uncaughtException', (err) => {
// console.error('There was an uncaught error:', err.message);
console.error('There was an uncaught error:', err.message);
if (err.message.includes('fetch failed')) {
if (messageCount === 0) console.error('Meilisearch error, search will be disabled');
messageCount++;