assets() in internal/webui/server.go falls back to index.html for any path it cannot stat, so client routes deep-link. Nothing excludes /api/, so a request for an endpoint this binary does not serve gets 200 text/html. The client then fails JSON.parse and shows "Unexpected token '<', "<!doctype "... is not valid JSON". Seen when a newer dashboard called /api/control-plane/audit on an archie-ui built before that endpoint existed; reproduce with curl on any unknown /api path.
Fix at the producer: /api/* (and /health, /webhooks) never fall back to index.html; an unmatched API path returns 404 with a JSON error body. lib/api.ts then reports 'this archied does not serve ' from the status, not from a parse failure.
Acceptance criteria
curl on an unknown /api path returns 404 application/json; a Go test covers it; the dashboard shows a plain 'not served' message for it.
Close reason
Unserved /api paths answer 404 with a plain-text reason the client already displays.
Imported from beads archie-core-eihf · GitHub #1061 · type bug · priority P2 · created 2026-09-25 · closed 2026-10-10
assets() in internal/webui/server.go falls back to index.html for any path it cannot stat, so client routes deep-link. Nothing excludes /api/, so a request for an endpoint this binary does not serve gets 200 text/html. The client then fails JSON.parse and shows "Unexpected token '<', "<!doctype "... is not valid JSON". Seen when a newer dashboard called /api/control-plane/audit on an archie-ui built before that endpoint existed; reproduce with curl on any unknown /api path.
Fix at the producer: /api/* (and /health, /webhooks) never fall back to index.html; an unmatched API path returns 404 with a JSON error body. lib/api.ts then reports 'this archied does not serve <path>' from the status, not from a parse failure.
### Acceptance criteria
curl on an unknown /api path returns 404 application/json; a Go test covers it; the dashboard shows a plain 'not served' message for it.
### Close reason
Unserved /api paths answer 404 with a plain-text reason the client already displays.
---
_Imported from beads `archie-core-eihf` · GitHub #1061 · type bug · priority P2 · created 2026-09-25 · closed 2026-10-10_
sam
added the mediumbug labels 2026-10-27 13:39:50 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
assets() in internal/webui/server.go falls back to index.html for any path it cannot stat, so client routes deep-link. Nothing excludes /api/, so a request for an endpoint this binary does not serve gets 200 text/html. The client then fails JSON.parse and shows "Unexpected token '<', "<!doctype "... is not valid JSON". Seen when a newer dashboard called /api/control-plane/audit on an archie-ui built before that endpoint existed; reproduce with curl on any unknown /api path.
Fix at the producer: /api/* (and /health, /webhooks) never fall back to index.html; an unmatched API path returns 404 with a JSON error body. lib/api.ts then reports 'this archied does not serve ' from the status, not from a parse failure.
Acceptance criteria
curl on an unknown /api path returns 404 application/json; a Go test covers it; the dashboard shows a plain 'not served' message for it.
Close reason
Unserved /api paths answer 404 with a plain-text reason the client already displays.
Imported from beads
archie-core-eihf· GitHub #1061 · type bug · priority P2 · created 2026-09-25 · closed 2026-10-10