code: def throw_if_bad_response(response):
      
      try:
          response.raise_for_status()
      except RequestException:
          try:
              msg = 'Response code: {}; response body:\n{}'.format(response.status_code, json.dumps(response.json(), indent=2))
              raise CerberusClientException(msg)
          except ValueError:
              msg = 'Response code: {}; response body:\n{}'.format(response.status_code, response.text)
              raise CerberusClientException(msg)
docs: Throw an exception if the Cerberus response is not successful.