How to return error from sendVerificationEmail ?

Hi, How do I throw an error in this callback in betterAuth config ? I technically can throw an error but it's not handled properly on the client . Just want to setup a ratelimit which would work in emailVerification for calls from the server not only direct calls from the client.
1 Reply
KiNFiSH
KiNFiSH2w ago
customRules: {
'/send-verification-email': {
window: 300, // 5 minutes window
max: 2 // 2 requests per 5 minutes
}
}
customRules: {
'/send-verification-email': {
window: 300, // 5 minutes window
max: 2 // 2 requests per 5 minutes
}
}
on ratelimt config ...which helps you extends ratelimter to specific routes if i get ur question ctx right. it is kinda vague.

Did you find this page helpful?