fix: catch thrown errors in src/api/activitypub

This commit is contained in:
Julian Lam
2024-07-10 10:15:31 -04:00
parent 00a266790d
commit fdc0d670d7

View File

@@ -24,7 +24,11 @@ const activitypubApi = module.exports;
function enabledCheck(next) {
return async function (caller, params) {
if (meta.config.activitypubEnabled) {
await next(caller, params);
try {
await next(caller, params);
} catch (e) {
winston.error(`[activitypub/api] Error\n${e.stack}`);
}
}
};
}