Skip to content

Commit 4563357

Browse files
fix(validation): update status code for validation exception response to HTTP_422_UNPROCESSABLE_CONTENT
1 parent 7e07a76 commit 4563357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ def validation_exception_handler(request: Request, exc: RequestValidationError):
115115
for error in exc.errors():
116116
details[error["loc"][-1]] = error.get("msg")
117117
return JSONResponse(
118-
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
118+
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
119119
content=jsonable_encoder({"detail": details}),
120120
)

0 commit comments

Comments
 (0)