diff --git a/frontend/src/routes/documents/[id]/+page.svelte b/frontend/src/routes/documents/[id]/+page.svelte index cbf079b2..2cac8cf8 100644 --- a/frontend/src/routes/documents/[id]/+page.svelte +++ b/frontend/src/routes/documents/[id]/+page.svelte @@ -120,7 +120,10 @@ async function handleAnnotationDeleteRequest(annotationId: string) { await deleteBlock(block.id); } else { // Annotation has no linked block — delete the annotation directly - await fetch(`/api/documents/${doc.id}/annotations/${annotationId}`, { method: 'DELETE' }); + const res = await fetch(`/api/documents/${doc.id}/annotations/${annotationId}`, { + method: 'DELETE' + }); + if (!res.ok) throw new Error('Delete annotation failed'); annotationReloadKey++; } }