From ae0927713dd47e2d14f41286d39f98a2f16d7f12 Mon Sep 17 00:00:00 2001 From: Zachary Hancock Date: Mon, 4 Oct 2021 16:32:34 -0400 Subject: [PATCH] fix: consistent error response on name change (#28866) --- openedx/core/djangoapps/user_api/accounts/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index c29e6abf57..b67e218ff1 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -450,7 +450,7 @@ class NameChangeView(APIView): return Response(status=status.HTTP_201_CREATED) else: return Response( - 'The name given was identical to the current name.', + {'new_name': 'The profile name given was identical to the current name.'}, status=status.HTTP_400_BAD_REQUEST )