def is_nonce_too_low_exception(exception):
    """check if the error thrown by web3 is a 'nonce too low' error"""
    if not isinstance(exception, ValueError) or not isinstance(exception.args[0], dict):
        return False
    message = exception.args[0].get("message", "")
    return (
        "There is another transaction with same nonce in the queue" in message
        or "Transaction nonce is too low" in message
    )