diff --git a/net/security.js b/net/security.js index 64afa34..6e25e1c 100644 --- a/net/security.js +++ b/net/security.js @@ -35,7 +35,7 @@ async function verifySignature (req, res, next) { } next() } catch (err) { - console.log('error during signature verification', err) + console.log('error during signature verification', err.message) return res.status(500).send() } } diff --git a/pub/federation.js b/pub/federation.js index 00dd906..d594326 100644 --- a/pub/federation.js +++ b/pub/federation.js @@ -42,7 +42,7 @@ function deliver (actor, activity, addresses) { body: pubUtils.toJSONLD(activity) }) .then(result => console.log('delivery:', addr, result.statusCode)) - .catch(err => console.log(err)) + .catch(err => console.log(err.message)) }) return Promise.all(requests) } diff --git a/routes/inbox.js b/routes/inbox.js index f0c2e85..209fcc1 100644 --- a/routes/inbox.js +++ b/routes/inbox.js @@ -42,7 +42,7 @@ router.post('/', net.validators.activity, net.security.verifySignature, function break case 'Undo': pub.activity.undo(req.body.object, req.body.actor) - .catch(err => console.log(err)) + .catch(err => console.log(err.message)) break } const tasks = [] @@ -54,7 +54,7 @@ router.post('/', net.validators.activity, net.security.verifySignature, function } Promise.all(tasks).then(() => res.status(200).send()) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send() }) }) @@ -68,7 +68,7 @@ router.get('/', function (req, res) { .toArray() .then(stream => res.json(pub.utils.arrayToCollection(stream, true))) .catch(err => { - console.log(err) + console.log(err.message) return res.status(500).send() }) }) diff --git a/routes/object.js b/routes/object.js index 8b86657..16eb217 100644 --- a/routes/object.js +++ b/routes/object.js @@ -17,7 +17,7 @@ router.get('/:name', function (req, res) { return res.status(404).send('Object not found') }) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send() }) } diff --git a/routes/outbox.js b/routes/outbox.js index 04298dc..0effc41 100644 --- a/routes/outbox.js +++ b/routes/outbox.js @@ -11,7 +11,7 @@ router.post('/', net.security.auth, net.validators.outboxActivity, function (req }) .then(() => res.status(200).send()) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send() }) }) @@ -25,7 +25,7 @@ router.get('/', function (req, res) { .toArray() .then(stream => res.json(pub.utils.arrayToCollection(stream, true))) .catch(err => { - console.log(err) + console.log(err.message) return res.status(500).send() }) }) diff --git a/routes/stream.js b/routes/stream.js index a7cb6e2..addf488 100644 --- a/routes/stream.js +++ b/routes/stream.js @@ -17,7 +17,7 @@ router.get('/:name', function (req, res) { return res.status(404).send('Activity not found') }) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send() }) } diff --git a/routes/user.js b/routes/user.js index ea4d6bb..bc7ad17 100644 --- a/routes/user.js +++ b/routes/user.js @@ -15,7 +15,7 @@ router.get('/:name', net.validators.jsonld, function (req, res) { return res.json(pub.utils.toJSONLD(group)) }) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send(`Error creating group ${name}`) }) }) @@ -32,7 +32,7 @@ router.get('/:name', function (req, res) { return res.render('group.html', { group, groupAcct }) }) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send(`Error creating group ${name}`) }) }) @@ -55,7 +55,7 @@ router.get('/:name/followers', net.validators.jsonld, function (req, res) { return res.json(pub.utils.arrayToCollection(followers)) }) .catch(err => { - console.log(err) + console.log(err.message) return res.status(500).send() }) }) diff --git a/routes/webfinger.js b/routes/webfinger.js index c497040..916a4f2 100644 --- a/routes/webfinger.js +++ b/routes/webfinger.js @@ -32,7 +32,7 @@ router.get('/', function (req, res) { return res.json(finger) }) .catch(err => { - console.log(err) + console.log(err.message) res.status(500).send() }) })