// Async, could be long
removeRedundanciesOfServer(server.id)
- .catch(err => logger.error('Cannot remove redundancy of %s.', server.host, err))
+ .catch(err => logger.error('Cannot remove redundancy of %s.', server.host, { err }))
await follow.destroy({ transaction: t })
})
function getActorUrl (actor: MActorFull) {
return getUrlFromWebfinger(actor.preferredUsername + '@' + actor.getHost())
.catch(err => {
- logger.warn('Cannot get actor URL from webfinger, keeping the old one.', err)
+ logger.warn('Cannot get actor URL from webfinger, keeping the old one.', { err })
return actor.url
})
}
await generateHTMLPage(req, res, req.params.language)
return
} catch (err) {
- logger.error('Cannot generate HTML page.', err)
+ logger.error('Cannot generate HTML page.', { err })
return res.status(HttpStatusCode.INTERNAL_SERVER_ERROR_500).end()
}
}
// Don't block the transaction
instance.removeImage()
- .catch(err => logger.error('Cannot remove actor image file %s.', instance.filename, err))
+ .catch(err => logger.error('Cannot remove actor image file %s.', instance.filename, { err }))
}
static loadByName (filename: string) {
// Don't block the transaction
instance.removeThumbnail()
- .catch(err => logger.error('Cannot remove thumbnail file %s.', instance.filename, err))
+ .catch(err => logger.error('Cannot remove thumbnail file %s.', instance.filename, { err }))
}
static loadByFilename (filename: string, thumbnailType: ThumbnailType): Promise<MThumbnail> {