Hi guys! I am having an issue displaying the error...
# suitecommerce
e
Hi guys! I am having an issue displaying the errors from the back-end validations on my template, I have a simple email fied on my template, the front-end validations are displayed correctly 'email is required', however if I commented out that validation and then try to display the back-end validations, the service return the error if the field is blank, I am using a modal and it just closes, I will share my template, maybe I am missing something to capture the errors
s
What you're getting back from your service looks correct – we would expect a 400 error because the user has, in fact, made a bad request
And we can see your message is being sent back
So you need a place for that error message to go, and then something to create a promise that resolves when it receives the message back from the server
e
oh! I did not know about it, I thought it was done automatically like the front-end validations! Thanks for your help as always! @Steve Goldberg
s
🤔
Not as far as I know. I don't think the application is set up to understand that an error message sent back from a service is an error message.
e
I got it, I think I had not needed to display a back-end validation error before, so for that reason my confusion but it makes totally sense.