Error handling with custom login form

I have noticed that errors coming from auth0 have different structures. for example, sometimes the response object has description as a string, sometimes as an object with rules, for example when I try to register with a weak password. so what should handling look like

Hi @orlov.vadym,

Welcome to the Community!

We appreciate the feedback. The varying error formats is something that we are aware of, and are trying to improve on. We would love to hear more about how we can do better in this area, if you have the time please submit a feedback ticket to our product team.

Thanks,
Dan