From 906ca0440fafbe2eeda41fb9535fb0f79108f5e7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 16 Apr 2026 13:30:09 -0400 Subject: [PATCH] fix: catch thrown errors in ap helpers._test --- src/activitypub/helpers.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/activitypub/helpers.js b/src/activitypub/helpers.js index d06a058201..5dff8c0b00 100644 --- a/src/activitypub/helpers.js +++ b/src/activitypub/helpers.js @@ -33,7 +33,11 @@ Helpers._webfingerCache = webfingerCache; // exported for tests Helpers._test = (method, args) => { // because I am lazy and I probably wrote some variant of this below code 1000 times already setTimeout(async () => { - console.log(await method.apply(method, args)); + try { + console.log(await method.apply(method, args)); + } catch (e) { + console.log('Exception thrown', e); + } }, 2500); }; // process.nextTick(() => {