@staticmethod
def _on_error_json(error):
    """
        Convert exception to JSON format to use with error handlers

        :param Exception error: Exception to parse
        :return: Dictionary with error type and message
        :rtype: dict
        """
    return {'error': {'type': error.__class__.__name__, 'message': str(error)}}
