Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

raise an APi error on django rest view

from rest_framework.exceptions import APIException

def my_view(request):
    raise APIException("There was a problem!")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #raise #APi #error #django #rest #view
ADD COMMENT
Topic
Name
9+7 =