We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bbff92 commit ba38b21Copy full SHA for ba38b21
1 file changed
modules/blog.ts
@@ -55,7 +55,11 @@ async function fetchBlueskyAvatars(
55
56
if (!existsSync(dest)) {
57
const res = await fetch(`${profile.avatar}@png`)
58
- await writeFile(join(imagesDir, `${hash}.png`), res.body!)
+ if (!res.ok || !res.body) {
59
+ console.warn(`[blog] Failed to fetch Bluesky avatar: ${profile.avatar}@png`)
60
+ continue
61
+ }
62
+ await writeFile(join(imagesDir, `${hash}.png`), res.body)
63
}
64
65
avatarMap.set(profile.handle, `/blog/avatar/${hash}.png`)
0 commit comments