Skip to content

Node.js based forum software built for the modern web

fix: catch thrown errors in src/api/activitypub

Julian Lamfdc0d670d794
diff --git a/src/api/activitypub.js b/src/api/activitypub.js
index 85b2d51ee8..0008dc82f8 100644
--- a/src/api/activitypub.js
+++ b/src/api/activitypub.js
@@ -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}`);
+ }
}
};
}