Fix error logging
This commit is contained in:
parent
0dcf9a14be
commit
d5b7d9110d
24 changed files with 57 additions and 41 deletions
|
@ -64,12 +64,12 @@ async function generateImageFromVideoFile (fromPath: string, folder: string, ima
|
|||
const destination = join(folder, imageName)
|
||||
await processImage({ path: pendingImagePath }, destination, size)
|
||||
} catch (err) {
|
||||
logger.error('Cannot generate image from video %s.', fromPath, err)
|
||||
logger.error('Cannot generate image from video %s.', fromPath, { err })
|
||||
|
||||
try {
|
||||
await unlinkPromise(pendingImagePath)
|
||||
} catch (err) {
|
||||
logger.debug('Cannot remove pending image path after generation error.', err)
|
||||
logger.debug('Cannot remove pending image path after generation error.', { err })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue