Skip to content

Commit

Permalink
added check on connector startup
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen-danswer committed Nov 20, 2024
1 parent 4c460c4 commit 59fbc04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/danswer/connectors/confluence/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None
is_cloud=self.is_cloud,
wiki_base=self.wiki_base,
)

spaces = self.confluence_client.get_all_spaces(limit=1)
if not spaces:
raise RuntimeError(
f"No spaces found at {self.wiki_base}! "
"Check your credentials and wiki_base and make sure "
"is_cloud is set correctly."
)
return None

def _get_comment_string_for_page_id(self, page_id: str) -> str:
Expand Down

0 comments on commit 59fbc04

Please sign in to comment.