Skip to content

Commit 7cdddbf

Browse files
committed
Update mock_server.py
1 parent cc2bfbb commit 7cdddbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/mock_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,12 +758,13 @@ async def validation_exception_handler(request, exc):
758758
)
759759

760760
# Catch generic typing errors for content (including lists passed to str)
761-
if param_name == "content":
761+
if param_name == "content" or (len(loc) > 1 and loc[-2] == "content"):
762762
if (
763763
"valid string" in error_msg
764764
or "str" in error_msg
765765
or err_type == "string_type"
766766
or err_type == "list_type" # Added list_type for robustness
767+
or err_type == "dict_type"
767768
):
768769
return JSONResponse(
769770
status_code=400,

0 commit comments

Comments
 (0)