[Frontend] Improve StreamingResponse Exception Handling (#11752)

This commit is contained in:
Robert Shaw
2025-01-05 16:35:01 -05:00
committed by GitHub
parent eba17173d3
commit 33fc1e2e86
2 changed files with 3 additions and 3 deletions

View File

@@ -371,7 +371,7 @@ class OpenAIServingCompletion(OpenAIServing):
# report to FastAPI middleware aggregate usage across all choices
request_metadata.final_usage_info = final_usage_info
except ValueError as e:
except Exception as e:
# TODO: Use a vllm-specific Validation Error
data = self.create_streaming_error_response(str(e))
yield f"data: {data}\n\n"