Skip to content

Commit bb87181

Browse files
🗜
1 parent 0e43254 commit bb87181

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pages/api/social-image.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ export default async function OGImage(req: NextRequest) {
3434
body: JSON.stringify({ pageId }),
3535
headers: { 'Content-Type': 'application/json' }
3636
})
37+
if (!pageInfoRes.ok) {
38+
return new Response(pageInfoRes.statusText, { status: pageInfoRes.status })
39+
}
3740
const pageInfo: NotionPageInfo = await pageInfoRes.json()
41+
console.log(pageInfo)
3842

3943
return new ImageResponse(
4044
(

0 commit comments

Comments
 (0)