From fdc0d670d794d4d876c40bca21cc45a3e20d2e47 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 10 Jul 2024 10:15:31 -0400 Subject: [PATCH] fix: catch thrown errors in src/api/activitypub --- src/api/activitypub.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}`); + } } }; }