docs: def log_request_fail(self, method, full_url, body, duration, status_code=None, exception=None):
          """
          Log an unsuccessful API call.
          """
          logger.warning(
              '%s %s [status:%s request:%.3fs]', method, full_url,
              status_code or 'N/A', duration, exc_info=exception is not None
          )
  
          if body and not isinstance(body, dict):
              body = body.decode('utf-8')
  
          logger.debug('> %s', body)