throw exception for invalid id status codes