def _validate_response(self, response):
try:<EOL><INDENT>response.raise_for_status()<EOL><DEDENT>except HTTPError as http_error:<EOL><INDENT>raise BadRequestException(str(http_error))<EOL><DEDENT>response_data = response.json()<EOL>if response_data["<STR_LIT>"] != self.RESPONSE_STATUS_OK:<EOL><INDENT>raise InvalidResponseException(<EOL>"<STR_LIT>".format(<EOL>response_data["<STR_LIT>"], response_data["<STR_LIT:error>"]<EOL>)<EOL>)<EOL><DEDENT>
:param response: requests.models.Response
:raises: pybomb.exceptions.InvalidResponseException
:raises: pybomb.exceptions.BadRequestException