add logger error

This commit is contained in:
Samuel Newman
2025-06-26 11:51:23 +03:00
parent a4507dff8e
commit dda4df295a
+6
View File
@@ -342,6 +342,12 @@ async function resolveMedia(
// posting will fail if aspect ratio is set to 0
const aspectRatio = width > 0 && height > 0 ? {width, height} : undefined
if (!aspectRatio) {
logger.error(
`Invalid aspect ratio - got { width: ${videoDraft.asset.width}, height: ${videoDraft.asset.height} }`,
)
}
return {
$type: 'app.bsky.embed.video',
video: videoDraft.pendingPublish.blobRef,