make notValid a status code