Added custom error and response validation