Hyeonsang Cho 19e861d0c3
fix(skills): keep load error text out of user-facing skill read 500s (#7155)
* fix(skills): keep load error text out of user-facing skill read 500s

GET /api/skills, /api/skills/custom and /api/skills/{name} are open to
every signed-in user, but their 500 detail echoed str(e). A malformed or
unreadable extensions_config.json (re-read on every load by the
user-scoped storage) made all three return the file's absolute host path,
plus the [Errno 13] text for a permission error.

Return a fixed detail like the diagnostics and reload routes already do,
chain the cause, and keep the full error in the Gateway log.

* docs(changelog): reference #7155 for the skill read 500 detail fix

* test(skills): pin capability skill discovery 500 through the real Gateway app

GET /api/capabilities/installations/skills reads the same user-scoped
storage as the skill routes but has no handler of its own. Its 500 body
is TraceMiddleware's fixed fallback, so drive create_app() with a
malformed extensions_config.json and assert no host path reaches the
body on any of the four reads.
2026-10-20 22:51:02 +08:00
..