(request, message=None, details=None, exec_info=None)
:param request: a Django request object
    :param message: message string
    :param details: dict with additional details to be included in the output
:param request: a Django request object
    :param message: message string
    :param details: dict with additional details to be included in the output
: param request : a Django request object : param message : message string : param details : dict with additional details to be included in the output
def notify_exception(request, message=None, details=None, exec_info=None):
    """
    :param request: a Django request object
    :param message: message string
    :param details: dict with additional details to be included in the output
    """
    if request is None:
        request = get_request()
    if request is not None:
        message = message or request.path
    if isinstance(message, bytes):
        try:
            message = message.decode('utf-8')
        except UnicodeDecodeError:
            message = repr(message)

    message = 'Notify Exception: %s' % (
        message or "No message provided, fix error handler"
    )

    notify_logger.error(
        message,
        exc_info=exec_info or sys.exc_info(),
        extra={
            'status_code': 500,
            'request': request,
            'details': details,
        }
    )
def notify_exception ( request , message = None , details = None , exec_info = None ) : if request is None : request = get_request ( ) if request is not None : message = message or request . path if isinstance ( message , bytes ) : try : message = message . decode ( 'utf-8' ) except UnicodeDecodeError : message = repr ( message ) message = 'Notify Exception: %s' % ( message or "No message provided, fix error handler" ) notify_logger . error ( message , exc_info = exec_info or sys . exc_info ( ) , extra = { 'status_code' : 500 , 'request' : request , 'details' : details , } )