some logging cleanup
This commit is contained in:
parent
5726e07f13
commit
26eee3c27a
8 changed files with 13 additions and 13 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue