How to handle phoneNumber.sendOtp errors ? Only 500 is returned
Hey, I wanted to know if it's possible to handle errors that happen in the sendOtp option of the phoneNumber plugin. Currently, throwed errors are sent as 500 without proper error message.
If the user provides a malformed input, I may want to be able to return a specific error for that, not just 500.
Does someone had this problem before, or can someone help me?
Wishing you a good day 😉
1 Reply
Can't you do it on the client side like if you want to check for malformed and if you received 500 make sure to run the client side logic. Since we get the custom phoneValidator or run the general fallback for that and return if that's fails with 500