def _initialize(self):
        if self.initialized:
            return

        self._fail_exc = None
        self.logger.debug("[API] Initializing...")
        try:
            self._initialize_api()
            self._initialized = True
            self.logger.debug("[API] Initialized")
        except Exception as e:
            self._initialized = False
            self._fail_exc = e
            raise