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 0e43254 commit bb87181Copy full SHA for bb87181
pages/api/social-image.tsx
@@ -34,7 +34,11 @@ export default async function OGImage(req: NextRequest) {
34
body: JSON.stringify({ pageId }),
35
headers: { 'Content-Type': 'application/json' }
36
})
37
+ if (!pageInfoRes.ok) {
38
+ return new Response(pageInfoRes.statusText, { status: pageInfoRes.status })
39
+ }
40
const pageInfo: NotionPageInfo = await pageInfoRes.json()
41
+ console.log(pageInfo)
42
43
return new ImageResponse(
44
(
0 commit comments