mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: make socket errors and static hook errors less noisy
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user