fix: stringify error body in ap.send

This commit is contained in:
Julian Lam
2024-02-09 11:37:22 -05:00
parent 12968b6291
commit 401b4c5fa6

View File

@@ -235,7 +235,7 @@ ActivityPub.send = async (type, id, targets, payload) => {
if (String(response.statusCode).startsWith('2')) { if (String(response.statusCode).startsWith('2')) {
winston.verbose(`[activitypub/send] Successfully sent ${payload.type} to ${uri}`); winston.verbose(`[activitypub/send] Successfully sent ${payload.type} to ${uri}`);
} else { } else {
winston.warn(`[activitypub/send] Could not send ${payload.type} to ${uri}; error: ${body}`); winston.warn(`[activitypub/send] Could not send ${payload.type} to ${uri}; error: ${String(body)}`);
} }
} catch (e) { } catch (e) {
winston.warn(`[activitypub/send] Could not send ${payload.type} to ${uri}; error: ${e.message}`); winston.warn(`[activitypub/send] Could not send ${payload.type} to ${uri}; error: ${e.message}`);