fix: make socket errors and static hook errors less noisy

This commit is contained in:
Julian Lam
2023-10-03 12:02:56 -04:00
parent 0b0c38eb84
commit 2a1be01ac0
2 changed files with 3 additions and 3 deletions

View File

@@ -335,10 +335,11 @@ async function fireStaticHook(hook, hookList, params) {
if (err && err.message === 'timeout') {
winston.warn(`[plugins] Callback timed out, hook '${hook}' in plugin '${hookObj.id}'`);
} else {
winston.error(`[plugins] Error executing '${hook}' in plugin '${hookObj.id}'\n${err.stack}`);
if (!noErrorHooks.includes(hook)) {
throw err;
}
winston.error(`[plugins] Error executing '${hook}' in plugin '${hookObj.id}'\n${err.stack}`);
}
}
}