mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
fix: catch thrown errors in src/api/activitypub
This commit is contained in:
@@ -24,7 +24,11 @@ const activitypubApi = module.exports;
|
|||||||
function enabledCheck(next) {
|
function enabledCheck(next) {
|
||||||
return async function (caller, params) {
|
return async function (caller, params) {
|
||||||
if (meta.config.activitypubEnabled) {
|
if (meta.config.activitypubEnabled) {
|
||||||
await next(caller, params);
|
try {
|
||||||
|
await next(caller, params);
|
||||||
|
} catch (e) {
|
||||||
|
winston.error(`[activitypub/api] Error\n${e.stack}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user