0
I have a problem showing the error message that came from the backend. I return in the backend:
res.status(400). send({error: "User already exists"});
already on the front I would like to display this message, instead of the default message that is shown:
Request failed with status code 400
how can I receive and show this message coming from backend?
front-end code:
try{
//sucess
}catch(error){
console.log(`$error`);
}
put in question the javascript code where it treats the return of backend
– Ricardo Pontual
if possible, send the return of your Sponse -> console.log(Answer)
– Rafael Rotiroti
I believe you’re using Aces to make the request, right?
– Lucas Brogni