fix(api)!: key the health route and keep server internals from user keys

/api/health needs X-Secret-Key but stays outside the rate limit. Only the admin key gets load_errors from /api/services, default error details no longer name the exception class, and a prepare signal replaces aiohttp's Server banner on every response while the CDM routes keep their own.
This commit is contained in:
imSp4rky
2026-11-03 11:53:55 -07:00
parent b6429ecdfd
commit 87ccd6666c
16 changed files with 105 additions and 47 deletions
+6
View File
@@ -95,6 +95,12 @@ def test_build_error_response_from_generic_exception() -> None:
assert body["message"] == f"oops (ref {body['ref']})"
def test_categorize_fallback_names_no_exception_class() -> None:
err = categorize_exception(RuntimeError("oops"), context={"op": "x"})
assert err.error_code == APIErrorCode.INTERNAL_ERROR
assert err.details == {"op": "x"}
def test_build_error_response_debug_mode_includes_traceback() -> None:
try:
raise ValueError("kaboom")