fix(web): conversation DELETE — resolve Failed to fetch TypeError #204

Merged
jason.woltje merged 1 commits from fix/delete-conversation into main 2026-03-17 02:43:57 +00:00
Owner

DELETE conversation was failing with a TypeError. Root cause identified and fixed. Fixes #195.

DELETE conversation was failing with a TypeError. Root cause identified and fixed. Fixes #195.
jason.woltje added 1 commit 2026-03-17 02:39:13 +00:00
fix(web): conversation DELETE — resolve Failed to fetch TypeError
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
9f046693be
Root cause: @fastify/cors default allowed methods are only GET, HEAD, POST
(CORS-safelisted methods). DELETE requires a CORS preflight OPTIONS request,
and without DELETE in Access-Control-Allow-Methods the browser rejects it
with TypeError: Failed to fetch before the request reaches the server.

Fix: explicitly set methods in enableCors() to include DELETE and all other
HTTP verbs used by the API.

Also add try/catch to handleDelete in ChatPage so errors surface in the
console rather than becoming unhandled promise rejections.

Fixes #195.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit cbfd6fb996 into main 2026-03-17 02:43:57 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#204