Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: catch blob error

Marc Seitzc176444f6f5a
diff --git a/pages/api/mupdf/convert-page.ts b/pages/api/mupdf/convert-page.ts
index c0982621..710ea302 100644
--- a/pages/api/mupdf/convert-page.ts
+++ b/pages/api/mupdf/convert-page.ts
@@ -41,6 +41,11 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
access: "public",
});
+ if (!blob) {
+ res.status(500).json({ error: `Failed to upload document page ${pageNumber}` });
+ return;
+ }
+
const documentPage = await prisma.documentPage.create({
data: {
versionId: documentVersionId,