title: django-rest-framwork: AttributeError, 'Response' object has no attribute 'title'
body: <p><strong>AttributeError:</strong> Got AttributeError when attempting to get a value for field <code>title</code> on serializer <code>QuestionSerializer</code>.
  The serializer field might be named incorrectly and not match any attribute or key on the <code>Response</code> instance.
  Original exception text was: 'Response' object has no attribute 'title'.</p>
  <p><strong>models.py</strong></p>
  <pre><code>class Question(models.Model):
      title = models.TextField(null=False,blank=False)
      status = models.CharField(default='inactive',max_length=10)
      created_by = models.ForeignKey(User,null=True,blank=True,on_delete=models.SET_NULL)
  
      def __str__(self):
          return self.title
  
      class Meta:
          ordering = ('id',)
  </code></pre>
  <p><strong>urls.py</strong></p>
  <pre><code>urlpatterns = [
      path('poll/&lt;int:id&gt;/', PollDetailsAPIView.as_view()),
  ]
  </code></pre>
  <p><strong>serializers.py</strong></p>
  <pre><code>class QuestionSerializer(serializers.ModelSerializer):
      class Meta:
          model = Question
          fields =[
              'id',
              'title',
              'status',
              'created_by'
          ]
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>class PollDetailsAPIView(APIView):
      
      def get_object(self, id):
          try:
              return Question.objects.get(id=id)
          except Question.DoesNotExist:
              return Response({&quot;error&quot;: &quot;Question does not exist&quot;}, status=status.HTTP_404_NOT_FOUND)
      
      def get(self, request, id):
          question = self.get_object(id)
          serializer = QuestionSerializer(question)
          return Response(serializer.data)
  </code></pre>
  <p>on postman, i am trying to get an id that doesnt exist but instead of getting this response <code>&quot;error&quot;: &quot;Question does not exist&quot;</code> and an <code>Error: 404</code>, i keep getting <code>error 500 Internal server error</code>.</p>