Error checking working this time, but error not being sent back with reponse yet