errors/middleware.py
def expand_exception(exception):
    """Returns tuple of (exception class, readable exception name, 
    and status code for the response).
    """
    for e_type, readable_exception, status_code in CATCHABLE:
        if isinstance(exception, e_type):
            return e_type, readable_exception, status_code
    
    return exception.__class__, exception.__class__.__name__, 500
Returns tuple of (exception class, readable exception name, 
    and status code for the response).
    
Returns tuple of (exception class, readable exception name,
and status code for the response).
Returns tuple of ( exception class readable exception name and status code for the response ) .
def expand_exception(exception):
    for e_type, readable_exception, status_code in CATCHABLE:
        if isinstance(exception, e_type):
            return e_type, readable_exception, status_code
    return exception.__class__, exception.__class__.__name__, 500
def expand_exception ( exception ) : for e_type , readable_exception , status_code in CATCHABLE : if isinstance ( exception , e_type ) : return e_type , readable_exception , status_code return exception . __class__ , exception . __class__ . __name__ , 500
Returns tuple of (exception class, readable exception name,
and status code for the response).
Returns tuple of ( exception class readable exception name and status code for the response ) .
"""Returns tuple of (exception class, readable exception name, 
    and status code for the response).
    """
exception