Hi, I am writing an app that let people register their email
When if the email already exist in the database, the server should throw an error
I am using useFetch:
const { data, error } = await useFetch('api/route')
if (error.value) {
console.error(error)
}
But the above only gives ambiguous error to the users
i.e.
- Error: (500 Internal Server Error (api/route))
I would like the error to be more verbose for the users
i.e.
+ Error: email is already in used
Is there a nuxt built-in way to do this?
if so, please you point me to the docs
If there's no built in way doing it, how would you do it?
Can you point me to some useful resource?
A high level view of the design is high appreciated