From 96229795dd11a23e6bfd6c79c3a4c6c850b01a80 Mon Sep 17 00:00:00 2001 From: Quvonchbek Bobojonov <111079758+QuvonchbekBobojonov@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:32:13 +0500 Subject: [PATCH] Update exceptions.py --- rest_framework/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index bc20fcaa3..3032f1155 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -141,7 +141,7 @@ class APIException(Exception): # raise serializers.ValidationError('Value was invalid') class ValidationError(APIException): - status_code = status.HTTP_400_BAD_REQUEST + status_code = status.HTTP_422_UNPROCESSABLE_ENTITY default_detail = _('Invalid input.') default_code = 'invalid' default_params = {}