class_docstr: Raised when we get an unexpected response.
class_docstr_tok: ["Raised","when","we","get","an","unexpected","response","."]
code: def __init__(self, response):
      super().__init__("Unexpected server response")
      self.response = response
      self.status_code = response.status_code
  
      try:
          r = response.json()
          self.info = r["info"]
          self.message = response.json()["message"]
      except (json.JSONDecodeError, KeyError):
          self.info = None
          self.message = response.text
  
imports: import abc
  from collections.abc import MutableMapping
  import logging
  import requests
  from requests.auth import HTTPBasicAuth
  from re import compile
  import json
label_desc: Use image node_id 1 to create a new ResponseError object from inherited base classes: Exception with example: obj = ResponseError(response)