From 7eeabc93aa909e5de6cf703169b13630279de2fd Mon Sep 17 00:00:00 2001 From: claude Date: Wed, 17 Jun 2026 19:58:48 +0000 Subject: [PATCH] fix: send empty JSON body on convert to avoid body-parser 400 postJSON without options sends Content-Type: application/json with no body; body-parser's BodyParserWrapper intercepts the resulting SyntaxError and returns 400 before the route handler runs. Co-Authored-By: Claude Sonnet 4.6 --- .../frontend/js/features/ide-react/hooks/use-convert-doc.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/ide-react/hooks/use-convert-doc.ts b/services/web/frontend/js/features/ide-react/hooks/use-convert-doc.ts index 497a9cab22..20802e3095 100644 --- a/services/web/frontend/js/features/ide-react/hooks/use-convert-doc.ts +++ b/services/web/frontend/js/features/ide-react/hooks/use-convert-doc.ts @@ -18,7 +18,9 @@ export default function useConvertDoc( setConverting(true) hideExportDocumentError() try { - await postJSON(`/project/${projectId}/doc/${docId}/convert/${type}`) + await postJSON(`/project/${projectId}/doc/${docId}/convert/${type}`, { + body: {}, + }) // File tree updates automatically via socket event } catch (err: any) { const errorMessage = err?.data?.error