Return a response with the body containing a JSON-formatter version of the exception.

def render_exception_js(self, exception):
        """
        Return a response with the body containing a JSON-formatter version of the exception.
        """

        from .http import JsonResponse

        response = {}
        response["error"] = exception.error
        response["error_description"] = exception.reason

        return JsonResponse(response, status=getattr(exception, 'code', 400))