fix: placeholder image for thumbnails

Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
Varun Raj
2024-08-21 19:25:29 +05:30
parent ac4233d934
commit 8a49501f54
2 changed files with 3 additions and 3 deletions
-2
View File
@@ -1,5 +1,4 @@
import { cn } from "@/lib/utils"
import Sidebar from "../shared/Sidebar"
import { Toaster } from "../ui/toaster"
@@ -16,7 +15,6 @@ export default function RootLayout({ children }: RootLayoutProps) {
{children}
</div>
<Toaster />
</div>
)
}
+3 -1
View File
@@ -41,7 +41,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// Send the image data
res.send(Buffer.from(imageBuffer))
} catch (error) {
res.redirect("https://placehold.co/400")
console.error('Error:', error)
res.status(500).json({ message: 'Internal Server Error' })
// res.status(500).json({ message: 'Internal Server Error' })
}
}