title: How to throw back serializer.errors in Django?
body: <p>How do I throw the <code>serializer.errors</code> if I have a wrong input in some field? Do I have to code some "logic", or I just have to write some "configurations".</p>
  
  <pre><code>#models.py
  class Product(models.Model):
      name = models.CharField()
      amount = models.IntegerField()
      description = models.TextField()
  
  #serializers.py
  class ProductSerializer(serializers.ModelSerializer):
      class Meta:
          model = Product
          fields = '__all__'
      def create(self, validated_data):
          ...
      def update(self, instance, validated_data):
          ...
  
  #views.py
  class ProductViewSet(viewsets.ModelViewSet):
      serializer_class = ProductSerializer
  
      def partial_update(self, request, pk=None):
          ...
  
      def get_queryset(self):
          ...
  </code></pre>
  
  <p>For example I want to POST:</p>
  
  <pre><code>{
  "name": "Banana",
  "amount": "ABCD",
  "description": ""
  }
  </code></pre>
  
  <p>Instead of getting an error in the server: </p>
  
  <pre><code>ValueError: invalid literal for int() with base 10: 'ABCD'
  </code></pre>
  
  <p>I want a response like this:</p>
  
  <pre><code>{"amount": ["A valid integer is required."], "description": ["This field may not be blank."]}
  </code></pre>