def jsonify(self, status_code=None, message=None, headers=None):
        """
        Returns a representation of the error in a jsonic form that is
        compatible with flask's error handling.

        Keyword arguments allow custom error handlers to override parts of the
        exception when it is jsonified
        """
        if status_code is None:
            status_code = self.status_code
        if message is None:
            message = self.message
        if headers is None:
            headers = self.headers
        response = flask.jsonify({
            'status_code': status_code,
            'error': repr(self),
            'message': message,
        })
        if status_code is not None:
            response.status_code = status_code
        if headers is not None:
            response.headers = headers
        return response
def jsonify ( self , status_code = None , message = None , headers = None ) : if status_code is None : status_code = self . status_code if message is None : message = self . message if headers is None : headers = self . headers response = flask . jsonify ( { 'status_code' : status_code , 'error' : repr ( self ) , 'message' : message , } ) if status_code is not None : response . status_code = status_code if headers is not None : response . headers = headers return response
Returns a representation of the error in a jsonic form that is
        compatible with flask's error handling.

        Keyword arguments allow custom error handlers to override parts of the
        exception when it is jsonified