[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
@@ -21,6 +21,7 @@ def create_error_response(
if isinstance(message, Exception):
exc = message
message = str(exc)
logger.debug(
"create_error_response called with %s: %s", type(exc).__name__, exc
)
@@ -33,6 +34,7 @@ def create_error_response(
VLLMUnprocessableEntityError,
VLLMValidationError,
)
from vllm.v1.engine.exceptions import EngineDeadError
if isinstance(exc, GracefulHTTPError):
err_type = HTTPStatus(exc.http_status).phrase
@@ -63,6 +65,11 @@ def create_error_response(
)
status_code = exc.status_code
param = None
elif isinstance(exc, EngineDeadError):
err_type = "InternalServerError"
status_code = HTTPStatus.INTERNAL_SERVER_ERROR
param = None
message = exc.CLIENT_MESSAGE
elif isinstance(exc, VLLMServerError):
# Any other server-caused error defaults to 500.
err_type = "InternalServerError"
@@ -88,8 +95,6 @@ def create_error_response(
status_code = HTTPStatus.INTERNAL_SERVER_ERROR
param = None
message = str(exc)
return ErrorResponse(
error=ErrorInfo(
message=sanitize_message(message),