diff --git a/src/controllers/admin/federation.js b/src/controllers/admin/federation.js index 7c3d8e8815..230e8b1fd9 100644 --- a/src/controllers/admin/federation.js +++ b/src/controllers/admin/federation.js @@ -117,17 +117,20 @@ federationController.errors = async function (req, res) { return null; } let { type, body, stack } = errorObj[idx]; + let activityType; let hostname = 'Invalid hostname'; const timestampISO = new Date(timestamp).toISOString(); try { - body = JSON.stringify(JSON.parse(body), null, 4); + const parsed = JSON.parse(body); + ({ type: activityType } = parsed); + body = JSON.stringify(parsed, null, 4); stack = validator.escape(stack.replace(/\s+$/gm, '')); ({ hostname } = new URL(id)); } catch (e) { // noop } - return { id, type, body, stack, hostname, timestamp, timestampISO }; + return { id, type, activityType, body, stack, hostname, timestamp, timestampISO }; }).filter(Boolean); res.render('admin/federation/errors', { diff --git a/src/views/admin/federation/errors.tpl b/src/views/admin/federation/errors.tpl index c5efbb74b1..746eed3198 100644 --- a/src/views/admin/federation/errors.tpl +++ b/src/views/admin/federation/errors.tpl @@ -13,6 +13,7 @@ {{{ if (./type == "in") }}}IN{{{ else }}}OUT{{{ end }}} + {./activityType}
{./id}