post route definied with error messages