infiniflow/ragflow · error · ConnectorMissingCredentialError

Jira

Error message

Jira

What it means

ConnectorMissingCredentialError('Jira') raised at the top of validate_connector_settings when self.jira_client is still None - i.e. validate_connector_settings() was called before load_credentials() successfully created the client. The bare 'Jira' message identifies the connector, not a specific failure; it is purely a lifecycle-order error.

Source

Thrown at common/data_source/jira/connector.py:188

                    options=options,
                )
            elif user_email and password:
                self.jira_client = JIRA(
                    server=jira_url_for_client,
                    basic_auth=(user_email, password),
                    options=options,
                )
            else:
                raise ConnectorMissingCredentialError("Jira credentials must include either an API token or username/password.")
        except Exception as exc:  # pragma: no cover - jira lib raises many types
            raise ConnectorMissingCredentialError(f"Jira: {exc}") from exc
        self._sync_timezone_from_server()
        return None

    def validate_connector_settings(self) -> None:
        """Validate connectivity by fetching basic Jira info."""
        if not self.jira_client:
            raise ConnectorMissingCredentialError("Jira")

        try:
            if self.jql_query:
                dummy_checkpoint = self.build_dummy_checkpoint()
                checkpoint_callback = self._make_checkpoint_callback(dummy_checkpoint)
                iterator = self._perform_jql_search(
                    jql=self.jql_query,
                    start=0,
                    max_results=1,
                    fields="key",
                    all_issue_ids=dummy_checkpoint.all_issue_ids,
                    checkpoint_callback=checkpoint_callback,
                    next_page_token=dummy_checkpoint.cursor,
                    ids_done=dummy_checkpoint.ids_done,
                )
                next(iter(iterator), None)
            elif self.project_key:
                self.jira_client.project(self.project_key)

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Call load_credentials(creds) and let it return before calling validate_connector_settings().
  2. If load_credentials raised, do not proceed to validation - propagate the error instead.
  3. Guard with a check of connector.jira_client in generic orchestration code and load credentials first.

Example fix

# before
connector = JiraConnector(jira_base_url=url)
connector.validate_connector_settings()  # ConnectorMissingCredentialError('Jira')

# after
connector = JiraConnector(jira_base_url=url)
connector.load_credentials(creds)
connector.validate_connector_settings()
Defensive patterns

Strategy: validation

Validate before calling

def jira_connector_ready(connector) -> bool:
    return connector.jira_client is not None

Try / catch

try:
    connector.validate_connector_settings()
except ConnectorMissingCredentialError:
    if connector.jira_client is None:
        raise RuntimeError('Call load_credentials() before validate_connector_settings()')
    raise

Prevention

When it happens

Trigger: Constructing JiraConnector and immediately calling validate_connector_settings() without an intervening load_credentials(); or a prior load_credentials that raised, leaving jira_client unset, followed by a catch-all that still runs validation.

Common situations: Orchestration code that validates all connectors in a loop regardless of whether credential loading succeeded; refactors that reordered lifecycle calls; retry paths that skip the credential step.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/0c17c99b2ec680d7. Report an issue: GitHub.