(self, *args, **kwargs)
Dispatches request and does generic error handling
Dispatches request and does generic error handling
Dispatches request and does generic error handling
def dispatch(self, *args, **kwargs):
        """Dispatches request and does generic error handling"""
        try:
            return super(APIView, self).dispatch(*args, **kwargs)

        except ObjectDoesNotExist as e:
            return HttpResponseNotFound(str(e))

        except (RequestException, ParameterMissing) as e:
            return HttpResponseBadRequest(str(e))
def dispatch ( self , * args , * * kwargs ) : try : return super ( APIView , self ) . dispatch ( * args , * * kwargs ) except ObjectDoesNotExist as e : return HttpResponseNotFound ( str ( e ) ) except ( RequestException , ParameterMissing ) as e : return HttpResponseBadRequest ( str ( e ) )