// 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) {
case ActorImageType.BANNER:
return join(LAZY_STATIC_PATHS.BANNERS, this.filename)
+
+ default:
+ throw new Error('Unknown actor image type: ' + this.type)
}
}