infiniflow/ragflow · error · ConnectorValidationError

{exc}

Error message

{exc}

What it means

ConnectorValidationError whose message is the str() of an underlying ValueError from scoped_url(jira_base_url, 'jira'). This path only runs when scoped_token=True and the base URL passes is_atlassian_cloud_url; scoped_url then tries to derive the product-scoped URL (e.g. https://yourcompany.atlassian.net/jira) and fails, typically because the URL is malformed or already contains a path.

Source

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

            try:
                buffer_value = int(time_buffer_seconds)
            except (TypeError, ValueError) as exc:
                raise ConnectorValidationError(f"Invalid time_buffer_seconds value ({time_buffer_seconds!r}); expected an integer.") from exc
        self.time_buffer_seconds = max(0, buffer_value)

    # -------------------------------------------------------------------------
    # Connector lifecycle helpers
    # -------------------------------------------------------------------------

    def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None:
        """Instantiate the Jira client using either an API token or username/password."""
        jira_url_for_client = self.jira_base_url
        if self.scoped_token:
            if is_atlassian_cloud_url(self.jira_base_url):
                try:
                    jira_url_for_client = scoped_url(self.jira_base_url, "jira")
                except ValueError as exc:
                    raise ConnectorValidationError(str(exc)) from exc
            else:
                logger.warning("[Jira] Scoped token requested but Jira base URL does not appear to be an Atlassian Cloud domain; scoped token ignored.")

        user_email = credentials.get("jira_user_email") or credentials.get("jira_username")
        api_token = credentials.get("jira_api_token") or credentials.get("token") or credentials.get("api_token")
        password = credentials.get("jira_password") or credentials.get("password")
        rest_api_version = credentials.get("rest_api_version")

        if not rest_api_version:
            rest_api_version = JIRA_CLOUD_API_VERSION if api_token else JIRA_SERVER_API_VERSION
        options: dict[str, Any] = {"rest_api_version": rest_api_version}

        try:
            if user_email and api_token:
                self.jira_client = JIRA(
                    server=jira_url_for_client,
                    basic_auth=(user_email, api_token),
                    options=options,

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Pass a clean origin URL: scheme plus host only, no path, no trailing slash - e.g. 'https://yourcompany.atlassian.net'.
  2. Strip whitespace and trailing '/' before constructing the connector (the constructor rstrips after this check, so pre-clean).
  3. Read the wrapped ValueError text - it states exactly what scoped_url disliked about the URL.

Example fix

# before
JiraConnector(jira_base_url='https://acme.atlassian.net/', scoped_token=True)  # -> str(ValueError from scoped_url)

# after
JiraConnector(jira_base_url='https://acme.atlassian.net', scoped_token=True)
Defensive patterns

Strategy: validation

Validate before calling

from urllib.parse import urlparse

def clean_origin(url: str) -> str:
    p = urlparse(url.strip())
    return f'{p.scheme}://{p.netloc}'

Try / catch

try:
    connector = JiraConnector(jira_base_url=raw_url, scoped_token=True)
except ConnectorValidationError as e:
    if 'url' in str(e).lower():
        connector = JiraConnector(jira_base_url=clean_origin(raw_url), scoped_token=True)
    else:
        raise

Prevention

When it happens

Trigger: scoped_token=True with a base URL like 'https://yourcompany.atlassian.net/', 'https://host//jira', or a URL the cloud check lets through but the parser rejects (bad scheme, embedded path, whitespace).

Common situations: Enabling scoped-token support for Atlassian guard-style setups; URLs pasted with trailing slashes or a pre-appended /jira path; normalizing logic elsewhere in the pipeline mangling the URL before it reaches the connector.

Related errors


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