{"record":{"id":"b1791637a6bf7461","repo":"infiniflow/ragflow","slug":"jira-base-url-must-be-provided","errorCode":null,"errorMessage":"Jira base URL must be provided.","messagePattern":"Jira base URL must be provided\\.","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"error","filePath":"common/data_source/jira/connector.py","lineNumber":102,"sourceCode":"    \"\"\"Retrieve Jira issues and emit them as Markdown documents.\"\"\"\n\n    def __init__(\n        self,\n        jira_base_url: str,\n        project_key: str | None = None,\n        jql_query: str | None = None,\n        batch_size: int = INDEX_BATCH_SIZE,\n        include_comments: bool = True,\n        include_attachments: bool = False,\n        labels_to_skip: Sequence[str] | None = None,\n        comment_email_blacklist: Sequence[str] | None = None,\n        scoped_token: bool = False,\n        attachment_size_limit: int | None = None,\n        timezone_offset: float | None = None,\n        time_buffer_seconds: int | None = JIRA_SYNC_TIME_BUFFER_SECONDS,\n    ) -> None:\n        if not jira_base_url:\n            raise ConnectorValidationError(\"Jira base URL must be provided.\")\n\n        self.jira_base_url = jira_base_url.rstrip(\"/\")\n        self.project_key = project_key\n        self.jql_query = jql_query\n        self.batch_size = batch_size\n        self.include_comments = include_comments\n        self.include_attachments = include_attachments\n        configured_labels = labels_to_skip or JIRA_CONNECTOR_LABELS_TO_SKIP\n        self.labels_to_skip = {label.lower() for label in configured_labels}\n        self.comment_email_blacklist = {email.lower() for email in comment_email_blacklist or []}\n        self.scoped_token = scoped_token\n        self.jira_client: JIRA | None = None\n\n        self.max_ticket_size = JIRA_CONNECTOR_MAX_TICKET_SIZE\n        self.attachment_size_limit = attachment_size_limit if attachment_size_limit and attachment_size_limit > 0 else _DEFAULT_ATTACHMENT_SIZE_LIMIT\n        self._fields_param = _DEFAULT_FIELDS\n        self._slim_fields = _SLIM_FIELDS\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/jira/connector.py#L84-L120","documentation":"ConnectorValidationError raised in the JiraConnector constructor when jira_base_url is None or empty. The base URL is the only strictly required constructor argument; everything else has defaults. It fails at construction time, before any credential loading or network calls.","triggerScenarios":"Instantiating JiraConnector(jira_base_url='') or JiraConnector(jira_base_url=None, project_key='X'); passing a config dict where the URL key is misspelled or the value was consumed by an earlier .pop() or defaulted .get().","commonSituations":"Building connectors from tenant config where the URL field is blank in the UI; YAML/env misalignment (JIRA_URL vs JIRA_BASE_URL); a migration script creating connectors in bulk and skipping rows without a URL.","solutions":["Supply a non-empty base URL, e.g. 'https://yourcompany.atlassian.net' (Atlassian Cloud) or your Jira Server origin.","Validate the config source before construction: fail fast with a clear message when the field is blank.","Check for trailing whitespace or a value of the literal string 'None' coming from env vars."],"exampleFix":"# before\nconnector = JiraConnector(jira_base_url=cfg.get('jira_url', ''), project_key='OPS')  # '' -> ValidationError\n\n# after\nurl = (cfg.get('jira_url') or '').strip()\nif not url:\n    raise SystemExit('jira_url is required')\nconnector = JiraConnector(jira_base_url=url, project_key='OPS')","handlingStrategy":"validation","validationCode":"def valid_jira_base_url(url) -> bool:\n    return isinstance(url, str) and bool(url.strip()) and url.strip().startswith(('http://', 'https://'))","typeGuard":null,"tryCatchPattern":"try:\n    connector = JiraConnector(jira_base_url=base_url, project_key=key)\nexcept ConnectorValidationError as e:\n    if 'base URL must be provided' in str(e):\n        raise ValueError('Config source is missing the Jira URL field') from e\n    raise","preventionTips":["Require a non-empty URL at the config/schema layer (pydantic HttpUrl or similar).","Normalize config keys once, centrally, instead of relying on .get() defaults at construction sites.","Fail deployment checks when tenant configs contain blank connector URLs."],"tags":["jira","validation","configuration","connector"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}