[Frontend] Clean Client Facing 500 Report (#58043)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Robert Shaw
2026-10-14 14:27:58 -04:00
committed by GitHub
co-authored by Claude
parent 47232f3c7f
commit d3f6b2a7b3
3 changed files with 36 additions and 6 deletions
@@ -135,3 +135,21 @@ class TestAffectedModulesUseSanitize:
source = Path(spec.origin).read_text()
assert "sanitize_message" in source, f"{module} does not call sanitize_message"
assert "import" in source and "sanitize_message" in source
def test_engine_dead_error_response_hides_log_oriented_message():
"""Clients get a generic message with no reference to server internals."""
from vllm.entrypoints.serve.exception_handling.error_response import (
create_error_response,
)
from vllm.v1.engine.exceptions import EngineDeadError
exc = EngineDeadError()
err = create_error_response(exc)
assert err.error.code == 500
assert err.error.type == "InternalServerError"
assert err.error.message == EngineDeadError.CLIENT_MESSAGE
assert "stack trace" not in err.error.message
assert "log" not in err.error.message
assert "stack trace (above)" in str(exc)