Skip to content

Commit

Permalink
fix-display-appropriate-output-when-project-not-in-dev-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rbob86 committed Aug 22, 2024
1 parent 4660bdd commit 474d539
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion henry/modules/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,14 @@ def get_explore_join_stats(
def run_git_connection_tests(self, project_id: str):
"""Run all git connection tests for a given project."""
self.sdk.update_session(models.WriteApiSession(workspace_id="dev"))
supported_tests = self.sdk.all_git_connection_tests(project_id)

try:
supported_tests = self.sdk.all_git_connection_tests(project_id, transport_options={"headers": {"Accept": "application/json"}})
except error.SDKError as e:
if e.message == "The resource you're looking for could not be found":
return "Project not found in development mode"
else:
return "Error running git connection tests"
results = []
for test in supported_tests:
assert isinstance(test.id, str)
Expand Down Expand Up @@ -427,3 +434,4 @@ class Input(NamedTuple):
quiet: bool = False
save: Optional[bool] = False
timeout: Optional[int] = 120

0 comments on commit 474d539

Please sign in to comment.