{"record":{"id":"91e675f6f994f0fd","repo":"infiniflow/ragflow","slug":"jira-resource-not-found-http-404","errorCode":null,"errorMessage":"Jira resource not found (HTTP 404).","messagePattern":"Jira resource not found \\(HTTP 404\\)\\.","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":404,"severity":"error","filePath":"common/data_source/jira/connector.py","lineNumber":285,"sourceCode":"            )\n            try:\n                return (yield from self._load_from_checkpoint_internal(jql, checkpoint, start_filter=start))\n            except Exception as exc:\n                if attempt_start is not None and not retried_with_buffer and is_atlassian_date_error(exc):\n                    attempt_start = attempt_start - ONE_HOUR\n                    retried_with_buffer = True\n                    logger.info(f\"[Jira] Atlassian date error detected; retrying with start={attempt_start}.\")\n                    continue\n                raise\n\n    def _handle_validation_error(self, exc: Exception) -> None:\n        status_code = getattr(exc, \"status_code\", None)\n        if status_code == 401:\n            raise InsufficientPermissionsError(\"Jira credential appears to be invalid or expired (HTTP 401).\") from exc\n        if status_code == 403:\n            raise InsufficientPermissionsError(\"Jira token does not have permission to access the requested resources (HTTP 403).\") from exc\n        if status_code == 404:\n            raise ConnectorValidationError(\"Jira resource not found (HTTP 404).\") from exc\n        if status_code == 429:\n            raise ConnectorValidationError(\"Jira rate limit exceeded during validation (HTTP 429).\") from exc\n\n        message = getattr(exc, \"text\", str(exc))\n        if not message:\n            raise UnexpectedValidationError(\"Unexpected Jira validation error.\") from exc\n\n        raise ConnectorValidationError(f\"Jira validation failed: {message}\") from exc\n\n    def _load_from_checkpoint_internal(\n        self,\n        jql: str,\n        checkpoint: JiraCheckpoint,\n        start_filter: SecondsSinceUnixEpoch | None = None,\n    ) -> Generator[Document | ConnectorFailure, None, JiraCheckpoint]:\n        assert self.jira_client, \"load_credentials must be called before loading issues.\"\n\n        page_size = self._full_page_size()","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/jira/connector.py#L267-L303","documentation":"ConnectorValidationError raised by _handle_validation_error when the Jira exception has status_code == 404. The endpoint or resource referenced does not exist at that base URL: wrong site or host, a deleted project, an unknown issue key in the JQL, or a rest_api_version whose routes the server does not expose.","triggerScenarios":"validate_connector_settings() with a jql_query naming a deleted or nonexistent project (or issue key); the base URL pointing to a different site than the one hosting the project; a Jira Server vs Cloud API shape mismatch via rest_api_version.","commonSituations":"Renamed or archived projects after the connector was configured; a typo'd project_key; a tenant moved to another Atlassian site; migration between Server and Cloud.","solutions":["Verify the project key exists: browse https://yourcompany.atlassian.net/browse/KEY or call /rest/api/3/project/KEY.","Correct jira_base_url if the site changed, and update project_key/jql_query for renamed or archived projects.","Unset a forced rest_api_version so the client negotiates the right API for the server type.","Check __cause__ for which URL 404'd."],"exampleFix":"# before\nconnector = JiraConnector(jira_base_url='https://acme.atlassian.net', project_key='OLDKEY')  # archived -> 404\n\n# after\nconnector = JiraConnector(jira_base_url='https://acme.atlassian.net', project_key='NEWKEY')","handlingStrategy":"validation","validationCode":"def jira_project_exists(base_url: str, token: str, project_key: str) -> bool:\n    import requests\n    r = requests.get(f'{base_url.rstrip(\"/\")}/rest/api/3/project/{project_key}',\n                     headers={'Authorization': f'Bearer {token}'}, timeout=10)\n    return r.status_code != 404","typeGuard":null,"tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    if 'HTTP 404' in str(e):\n        raise ValueError('Jira project or site not found; verify base URL and project key') from e\n    raise","preventionTips":["Check that project keys exist and are not archived whenever connectors are reconfigured.","Pin jira_base_url to the site that actually hosts the project.","Let rest_api_version default instead of forcing a value that mismatches Server vs Cloud."],"tags":["jira","http-404","validation","configuration"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}