code: def _validate_response(self, response):
          
          try:
              response.raise_for_status()
          except HTTPError as http_error:
              raise BadRequestException(str(http_error))
  
          response_data = response.json()
          if response_data["status_code"] != self.RESPONSE_STATUS_OK:
              raise InvalidResponseException(
                  "Response code {0}: {1}".format(
                      response_data["status_code"], response_data["error"]
                  )
              )
docs: :param response: requests.models.Response
          :raises: pybomb.exceptions.InvalidResponseException
          :raises: pybomb.exceptions.BadRequestException