|
50 | 50 | "restrictions.read.restrictions.group",
|
51 | 51 | ]
|
52 | 52 |
|
53 |
| -_NO_PARENT_OR_NO_PERMISSIONS_ERROR_STR = ( |
54 |
| - "No parent or not permitted to view content with id" |
55 |
| -) |
56 |
| - |
57 | 53 |
|
58 | 54 | class ConfluenceConnector(LoadConnector, PollConnector, SlimConnector):
|
59 | 55 | def __init__(
|
@@ -123,21 +119,16 @@ def _get_comment_string_for_page_id(self, page_id: str) -> str:
|
123 | 119 | comment_cql += self.cql_label_filter
|
124 | 120 |
|
125 | 121 | expand = ",".join(_COMMENT_EXPANSION_FIELDS)
|
126 |
| - try: |
127 |
| - for comments in self.confluence_client.paginated_cql_page_retrieval( |
128 |
| - cql=comment_cql, |
129 |
| - expand=expand, |
130 |
| - ): |
131 |
| - for comment in comments: |
132 |
| - comment_string += "\nComment:\n" |
133 |
| - comment_string += extract_text_from_confluence_html( |
134 |
| - confluence_client=self.confluence_client, |
135 |
| - confluence_object=comment, |
136 |
| - ) |
137 |
| - except Exception as e: |
138 |
| - logger.exception("error fetching comments: \n") |
139 |
| - if _NO_PARENT_OR_NO_PERMISSIONS_ERROR_STR not in str(e): |
140 |
| - raise |
| 122 | + for comments in self.confluence_client.paginated_cql_page_retrieval( |
| 123 | + cql=comment_cql, |
| 124 | + expand=expand, |
| 125 | + ): |
| 126 | + for comment in comments: |
| 127 | + comment_string += "\nComment:\n" |
| 128 | + comment_string += extract_text_from_confluence_html( |
| 129 | + confluence_client=self.confluence_client, |
| 130 | + confluence_object=comment, |
| 131 | + ) |
141 | 132 |
|
142 | 133 | return comment_string
|
143 | 134 |
|
|
0 commit comments