code: def _get_error_message(response):
      
      try:
          data = response.json()
          if "error_description" in data:
              return data['error_description']
          if "error" in data:
              return data['error']
      except Exception:
          pass
  
      return "Unknown error"
docs: Attempt to extract an error message from response body