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 <noreply@anthropic.com>
This commit is contained in:
claude
2026-06-17 19:58:48 +00:00
parent ac2315bc8e
commit 7eeabc93aa
@@ -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