Fix incorrect error logs
This commit is contained in:
parent
42b4063699
commit
1cc9774668
|
@ -168,7 +168,7 @@ async function removeFollowing (req: express.Request, res: express.Response) {
|
|||
|
||||
// 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 })
|
||||
})
|
||||
|
|
|
@ -75,7 +75,7 @@ async function doRefresh <T extends MActorFull | MActorAccountChannelId> (option
|
|||
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
|
||||
})
|
||||
}
|
||||
|
|
|
@ -576,7 +576,7 @@ async function serveIndexHTML (req: express.Request, res: express.Response) {
|
|||
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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ export class ActorImageModel extends Model<Partial<AttributesOnly<ActorImageMode
|
|||
|
||||
// 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) {
|
||||
|
|
|
@ -127,7 +127,7 @@ export class ThumbnailModel extends Model<Partial<AttributesOnly<ThumbnailModel>
|
|||
|
||||
// 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> {
|
||||
|
|
Loading…
Reference in New Issue