You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
POST to an unknown /api route returns misleading 405 "Static assets are GET-only." #15
A non-GET request to an API path the adapter doesn't route falls through to the static View handler. That handler answers 405 "Static assets are GET-only." The message sends the caller (usually an agent writing frontend code) looking in the wrong place.
Seen in practice: the agent wired a frontend button to POST /api/_a2app/operate, which doesn't exist, and got:
Static assets are GET-only.
The real endpoint is POST /api/ops/<operation-name>. The error neither says the route doesn't exist nor points to it.
Where
adapters/adapter-core/src/static.ts:199-205: any method other than GET/HEAD returns method_not_allowed before the path is checked.
The same behaviour exists in toolkits/blueprint-go-react/template/main.go:385 and toolkits/blueprint-rust-react/template/src/main.rs:607.
Suggested fix
Unmatched requests under /api/ (and especially /api/_a2app/) should return 404 unknown_route from the adapter instead of reaching the static handler. For POSTs, include a hint such as: Operations are invoked with POST /api/ops/<name>; see /api/_a2app/describe for the list.
The static handler should return 405 only for paths that actually resolve to a static file. Otherwise it should 404.
Add adapter-core and blueprint tests: POST /api/_a2app/does-not-exist → 404 with the hint; POST /index.html → 405.
Activity
ahmad-ajmal commentedon Oct 2, 2026
Fixed in PR #17