# How to handle the error of over MAU limit?

**URL:** <https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [April 16, 2022, 6:36am UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861 "2022-04-16T06:36:23Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [April 16, 2022, 6:36am UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/1 "2022-04-16T06:36:23Z")

</div>

I would like to handle the error when the MAU rate limit is over.

Could you please tell me how to handle this error?  
I guess that I can use `error` of `useAuth0`, but I couldn’t find any documents about this.

Thanks

- **Which SDK this is regarding:** auth0-react
- **SDK Version:** 1.8.0
- **Platform Version:** Node 16.4.10

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 18, 2022, 9:59pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/3 "2022-04-18T21:59:19Z")

</div>

Hi @ijufumi,

Welcome to the Auth0 Community!

Can you post the full error you are seeing? And can you expand on your expectations of how to handle this? Do you have an example of what you mean?

---

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [April 21, 2022, 2:36am UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/4 "2022-04-21T02:36:33Z")

</div>

Sorry, I can not.

Previously, I faced a MAU rate limit error and upgraded my plan to resolve this issue.  
However, I would like to implement MAU rate limit error handling for the future.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 21, 2022, 3:13pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/5 "2022-04-21T15:13:42Z")

</div>

Without more information, it is difficult to understand what you are asking. What is the error name and description at least?

---

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [April 25, 2022, 1:49am UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/6 "2022-04-25T01:49:39Z")

</div>

Sorry for your confusion.

I don’t know what errors are returned when the count of Monthy Active Users is larger than contract one.  
Is it possible that the error message is **You have reached the global limit for your account**?

Like this → [Global limit has been reached](https://community.auth0.com/t/global-limit-has-been-reached/77440)

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 25, 2022, 3:51pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/7 "2022-04-25T15:51:26Z")

</div>

> [@ijufumi](#):
>
> I don’t know what errors are returned when the count of Monthy Active Users is larger than contract one.

That is a rate limit error, and isn’t associated with MAUs.

[From what I remember, there is no error that is thrown if you are over the MAU limit.](https://community.auth0.com/t/is-the-active-users-subscription-limit-a-hard-limit/7323)

---

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [May 6, 2022, 9:54pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/8 "2022-05-06T21:54:50Z")

</div>

Thanks for your response!  
I got it.

Can I handle the rate limit error using `error` of `useAuth0` of `auth0-react` ?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 9, 2022, 4:10pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/9 "2022-05-09T16:10:12Z")

</div>

How do you want to handle the error? With an error page?

---

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [May 10, 2022, 11:10pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/10 "2022-05-10T23:10:24Z")

</div>

Yes, exactly!

I want to show the error page when the rate limit error happened.

If possible, I would like to switch error pages depending on the cause.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 11, 2022, 3:00pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/11 "2022-05-11T15:00:24Z")

</div>

Can you share the existing code that is causing the error? Also, to be clear, you are calling the management API and getting a rate limit error? I ask because the management API is very limited for use with SPAs, and hitting the rate limit suggests something unintended is causing the increase in request volume.

Otherwise, it sounds like you just need information on how to handle _any_ HTTP error in react.

---

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [May 14, 2022, 8:22am UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/12 "2022-05-14T08:22:37Z")

</div>

Thank you for your response!

Our codes use `auth0-react` like the code of `Getting started`.

> **[GitHub - auth0/auth0-react: Auth0 SDK for React Single Page Applications (SPA)](https://github.com/auth0/auth0-react#getting-started)**
>
> Auth0 SDK for React Single Page Applications (SPA) - GitHub - auth0/auth0-react: Auth0 SDK for React Single Page Applications (SPA)

Therefore, I think it seems there are no problems with our codes.

> Otherwise, it sounds like you just need information on how to handle _any_ HTTP error in react.

It seems we can handle with `error` of `useAuth0`.  
Is it correct?

> <https://github.com/auth0/auth0-react/blob/main/src/auth0-provider.tsx#L262>

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 16, 2022, 4:08pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/13 "2022-05-16T16:08:55Z")

</div>

As long as the error is being returned in the useAuth0 hook, the state of the hook should include an `error` and you can render a component/element. There is an example in our demo. You can see it in action here:

> <https://github.com/auth0-samples/auth0-react-samples/blob/master/Sample-01/src/App.js#L24>

---

<div class="post-metadata">

**Author:** ![ijufumi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ijufumi/32/36661_2.png) [@ijufumi](https://community.auth0.com/u/ijufumi)\
**Post date:** [May 22, 2022, 7:23am UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/14 "2022-05-22T07:23:52Z")

</div>

Thank you for your sharing!

I’ll try it!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 28, 2022, 10:35pm UTC](https://community.auth0.com/t/how-to-handle-the-error-of-over-mau-limit/81861/15 "2022-06-28T22:35:31Z")

</div>


