mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-19 11:45:10 +08:00
Align p3 HTTP/SDK tests with current backend behavior (#12563)
### What problem does this PR solve? Updates pre-existing HTTP API and SDK tests to align with current backend behavior (validation errors, 404s, and schema defaults). This ensures p3 regression coverage is accurate without changing production code. ### Type of change - [x] Other (please describe): align p3 HTTP/SDK tests with current backend behavior --------- Co-authored-by: Liu An <asiro@qq.com>
This commit is contained in:
@ -82,6 +82,8 @@ async def validate_and_parse_json_request(request: Request, validator: type[Base
|
||||
2. Extra fields added via `extras` parameter are automatically removed
|
||||
from the final output after validation
|
||||
"""
|
||||
if request.mimetype != "application/json":
|
||||
return None, f"Unsupported content type: Expected application/json, got {request.content_type}"
|
||||
try:
|
||||
payload = await request.get_json() or {}
|
||||
except UnsupportedMediaType:
|
||||
|
||||
Reference in New Issue
Block a user