Skip to content

fix(server): sanitize runtime exception responses - #1138

Open
knqiufan wants to merge 1 commit into
oceanbase:mainfrom
knqiufan:fix/issue-1137-sanitize-runtime-errors
Open

fix(server): sanitize runtime exception responses#1138
knqiufan wants to merge 1 commit into
oceanbase:mainfrom
knqiufan:fix/issue-1137-sanitize-runtime-errors

Conversation

@knqiufan

@knqiufan knqiufan commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Sanitize runtime dependency probe failures before they reach /api/v1/system/status, and keep raw probe exceptions in server logs only.
  • Replace request-path service APIError messages and batch item errors that previously embedded str(e) with generic public messages.
  • Add regression coverage for synthetic DSN/secret/path exposure in dependency checks, status dependencies, service-layer errors, and batch response data.

Stack note

Test plan

  • python -m pytest tests/unit/server/test_health_check.py tests/unit/server/test_system_health.py
  • python -m pytest tests/unit/server
  • git diff --check
  • python -m pytest tests/unit was attempted locally; it still fails on unrelated local environment/tool assumptions, including API/model environment overrides, missing ModelScope cache, Windows script/tool availability, and an existing sqlite FTS setup error.

Fixes #1137

@knqiufan
knqiufan force-pushed the fix/issue-1137-sanitize-runtime-errors branch from a37bb5d to 1d6b89d Compare July 6, 2026 13:40

Copy link
Copy Markdown
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime dependency check and request-path errors still expose raw exceptions in API responses

2 participants