Error msges are displayed correctly on he front-end