# Button/Rule error: "logger\[level\] is not a function"

**URL:** <https://community.fibery.io/t/button-rule-error-logger-level-is-not-a-function/3342>\
**Category:** Bugs & Issues\
**Tags:** automations\
**Created:** [September 28, 2022, 6:50pm UTC](https://community.fibery.io/t/button-rule-error-logger-level-is-not-a-function/3342 "2022-09-28T18:50:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [September 28, 2022, 6:50pm UTC](https://community.fibery.io/t/button-rule-error-logger-level-is-not-a-function/3342/1 "2022-09-28T18:50:26Z")

</div>

This error happens when trying to execute a Button on a very long table view (13,000+ rows) with many rows selected:  
**(NOTE that it works fine when fewer rows are selected)**

![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/c/cc74a83029d6348fceef55927920361d08c5d8f6.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/1/177005b2e71c614b1fdf5f8f473c4db11baa2a05.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/7/7af4e515e47ab6a24e20133aafeb00beca92e599.png)

```auto
// Normalize Email
const fibery = context.getService('fibery')
for (const entity of args.currentEntities) {
    const email = entity['Email']
    const email2 = email.trim().toLowerCase()
    if (email !== email2) {
        // console.log(`Normalize email: (${entity['Public Id']}) "${email}" => "${email2}"`)
        await fibery.updateEntity(entity.type, entity.id, {
            'Email': email2
        })
    }
}

```

---

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [September 30, 2022, 11:47am UTC](https://community.fibery.io/t/button-rule-error-logger-level-is-not-a-function/3342/2 "2022-09-30T11:47:35Z")

</div>

I’ve noticed the same problems using buttons on large data sets as mentioned here

> [@Trouble deleting all entities in a large database](https://community.fibery.io/t/trouble-deleting-all-entities-in-a-large-database/2419/6):
>
> I have been intending to report similar issues recently. I plan to make a separate topic about this as I’m not aware of an existing one, but if you’d prefer to do so I will gladly contribute to it. I plan to post in the next few days, but will check first to see if you’ve gotten there first. wink

It’s a rather consistent problem although I never know what size is safe to operate on in one action. I’ve found scripting to be the best bet for more than 4000 records.

---

<div class="post-metadata">

**Author:** ![Polina\_Zenevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/polina_zenevich/32/480_2.png) [@Polina\_Zenevich](https://community.fibery.io/u/Polina_Zenevich)\
**Post date:** [October 3, 2022, 12:52pm UTC](https://community.fibery.io/t/button-rule-error-logger-level-is-not-a-function/3342/3 "2022-10-03T12:52:29Z")

</div>

Hi~  
That’s the bug on our side - an error will be fixed 💪

However, that won’t solve the original issue. The timeout is 60 seconds for now. And large volume operations need to be batched.  
We will think about how to make errors more friendly and how to improve performance in the future 🙂
