|
5 | 5 | from typing import Any
|
6 | 6 | from urllib.parse import quote
|
7 | 7 |
|
8 |
| -from requests.exceptions import HTTPError |
9 | 8 | from typing_extensions import override
|
10 | 9 |
|
11 | 10 | from onyx.configs.app_configs import CONFLUENCE_CONNECTOR_LABELS_TO_SKIP
|
|
22 | 21 | from onyx.connectors.confluence.utils import process_attachment
|
23 | 22 | from onyx.connectors.confluence.utils import update_param_in_path
|
24 | 23 | from onyx.connectors.confluence.utils import validate_attachment_filetype
|
25 |
| -from onyx.connectors.exceptions import ConnectorValidationError |
26 |
| -from onyx.connectors.exceptions import CredentialExpiredError |
27 |
| -from onyx.connectors.exceptions import InsufficientPermissionsError |
28 |
| -from onyx.connectors.exceptions import UnexpectedValidationError |
29 | 24 | from onyx.connectors.interfaces import CheckpointedConnector
|
30 | 25 | from onyx.connectors.interfaces import CheckpointOutput
|
31 | 26 | from onyx.connectors.interfaces import ConnectorCheckpoint
|
@@ -645,28 +640,30 @@ def retrieve_all_slim_documents(
|
645 | 640 | yield doc_metadata_list
|
646 | 641 |
|
647 | 642 | def validate_connector_settings(self) -> None:
|
648 |
| - try: |
649 |
| - spaces = self.low_timeout_confluence_client.get_all_spaces(limit=1) |
650 |
| - except HTTPError as e: |
651 |
| - status_code = e.response.status_code if e.response else None |
652 |
| - if status_code == 401: |
653 |
| - raise CredentialExpiredError( |
654 |
| - "Invalid or expired Confluence credentials (HTTP 401)." |
655 |
| - ) |
656 |
| - elif status_code == 403: |
657 |
| - raise InsufficientPermissionsError( |
658 |
| - "Insufficient permissions to access Confluence resources (HTTP 403)." |
659 |
| - ) |
660 |
| - raise UnexpectedValidationError( |
661 |
| - f"Unexpected Confluence error (status={status_code}): {e}" |
662 |
| - ) |
663 |
| - except Exception as e: |
664 |
| - raise UnexpectedValidationError( |
665 |
| - f"Unexpected error while validating Confluence settings: {e}" |
666 |
| - ) |
667 |
| - |
668 |
| - if not spaces or not spaces.get("results"): |
669 |
| - raise ConnectorValidationError( |
670 |
| - "No Confluence spaces found. Either your credentials lack permissions, or " |
671 |
| - "there truly are no spaces in this Confluence instance." |
672 |
| - ) |
| 643 | + # Freezing often, just removing for now |
| 644 | + return None |
| 645 | + # try: |
| 646 | + # spaces = self.low_timeout_confluence_client.get_all_spaces(limit=1) |
| 647 | + # except HTTPError as e: |
| 648 | + # status_code = e.response.status_code if e.response else None |
| 649 | + # if status_code == 401: |
| 650 | + # raise CredentialExpiredError( |
| 651 | + # "Invalid or expired Confluence credentials (HTTP 401)." |
| 652 | + # ) |
| 653 | + # elif status_code == 403: |
| 654 | + # raise InsufficientPermissionsError( |
| 655 | + # "Insufficient permissions to access Confluence resources (HTTP 403)." |
| 656 | + # ) |
| 657 | + # raise UnexpectedValidationError( |
| 658 | + # f"Unexpected Confluence error (status={status_code}): {e}" |
| 659 | + # ) |
| 660 | + # except Exception as e: |
| 661 | + # raise UnexpectedValidationError( |
| 662 | + # f"Unexpected error while validating Confluence settings: {e}" |
| 663 | + # ) |
| 664 | + |
| 665 | + # if not spaces or not spaces.get("results"): |
| 666 | + # raise ConnectorValidationError( |
| 667 | + # "No Confluence spaces found. Either your credentials lack permissions, or " |
| 668 | + # "there truly are no spaces in this Confluence instance." |
| 669 | + # ) |
0 commit comments