I'm intern and work on a project where I develop DRF API that need to interact with mobile app written by my colleague with Ionic framework. We are creating new user. My view method is following:class NewUser(generics.CreateAPIView):    model = User    permission_classes = [permissions.AllowAny]    serializer_class = NewUserSerializer    def create(self, request, *args, **kwargs):        serializer = self.get_serializer(data=request.data)        serializer.is_valid(raise_exception=True)        self.perform_create(serializer)        headers = self.get_success_headers(serializer.data)        token, created = Token.objects.get_or_create(user=serializer.instance)        return Response({'token': token.key}, status=status.HTTP_201_CREATED, headers=headers)When someone wants to create new user via POST request if user name has't been taken yet, then API return 201 status code and token in JSON, if user name already taken it returns 400 status and error message in JSON. MY colleague request me to change status message to 200 when he tries to create username with name that already exist. He says that he can't consume the ERROR response.His code looks like:$http.post(url,{username:$scope.tel,password:$scope.passwd}).success(function(data){alert(data);$ionicLoading.hide();console.log(data);})Questions:Should I tweak my API to send 200 status instead of more logical 400 for 'user already register' error?I tried to change my code, But i couldn't find the method to override in CreateAPIView/ModelSerializer of DRF. I ended up rewriting my view class to method:@api_view(['POST'])def newUser(request):        Saves a new user on the database        if request.method == 'POST':        serializer = NewUserSerializer(data=request.data)        if serializer.is_valid():            serializer.save()            token, created = Token.objects.get_or_create(user=serializer.instance)            return Response({'token': token.key}, status=status.HTTP_201_CREATED, headers=serializer.data)        else:            return Response(serializer.errors, status=status.HTTP_200_OK)If I want to change behavior of API and response, which method should I override?I'm new to Django and still don't quite know where we should use generic views VS. @.... methods.
Django REST custom methods for generic views
python;beginner;error handling;angular.js;django