Tahul / nuxt-edgedb

💽 Nuxt 3 integration for EdgeDB
70 stars 7 forks source link

Issues with signup error handling #32

Open ivanparramartinez opened 3 months ago

ivanparramartinez commented 3 months ago

I'm having an issue when implementing the Email/Password authentication. When using the signup method, and for example the user is already registered or the fields are not filled. I'm getting this in the response, which is not explaining anything about the error:

Captura de pantalla 2024-06-23 a la(s) 12 20 00 a  m

This is the actual use of signup in the embedded files:

Captura de pantalla 2024-06-23 a la(s) 12 19 52 a  m

And I think it might be something about the H3Error handling inside Nuxt. I don't get what's the issue. But I got to a probably solution, and it's in this code:

Captura de pantalla 2024-06-23 a la(s) 2 14 35 a  m Captura de pantalla 2024-06-23 a la(s) 2 14 40 a  m

Using a way to extend the H3Error class and making a constructor to introduce the message the way it's needed. I don't know if this is suitable for you, so maybe I can push it as a request. When I do this, this is the response I get:

Captura de pantalla 2024-06-23 a la(s) 2 15 47 a  m