refactor and consoolidate the server response validation to a single method