not getting rate limited
Hey folks I'm testing the rate limit functionality and here is my code https://mystb.in/56596703647e0db856 even though I'm making more than 2 signIn request in one minute I'm not getting rate limited or any other error also please check if I'm handling the auth error correctly
8 Replies
rate limiter works only on prod unless you pass
enabled:true
to force active it on devyou can check the code I provided I have enabled it
okay then sign-in and other endpoints employ custom rate limiting rules by default which is in 10 seconds window you can make max 3 requests. You can pass
customRules
to override thisokay can you check one thing if I'm handling the auth error correctly because error.status === "FORBIDDEN" doesn't clearly suggest that error happened becaus email was not verified or I will get this status when only email is not verified etc
it reutrns 429 not 403
what? I was talking about this piece of code
am I handling the error correct way
oh sorry you should check the error message or code instead of relying on status code
Hey, I would I like to report one problem with forgetPassword API which is when we invoke it, and it doesn't find the user in database the error is only logged in console not thrown due to which we can't catch it catch block also the status Boolean is always true so that's not helpful also how I am supposed to tell the user it didn't exist