Skip to content

Commit 0f76d41

Browse files
fix: Normalize API URLs to handle trailing slashes in Config API resolution (#922)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: aldo.gonzalez@airbyte.io <aldo.gonzalez@airbyte.io>
1 parent 525fec1 commit 0f76d41

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

airbyte/_util/api_util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def get_config_api_root(api_root: str) -> str:
118118
return str(config_api_override)
119119

120120
# Fall back to deriving from the main API root
121-
if api_root == CLOUD_API_ROOT:
121+
# Normalize URLs by stripping trailing slashes to handle common variants
122+
if api_root.rstrip("/") == CLOUD_API_ROOT.rstrip("/"):
122123
return CLOUD_CONFIG_API_ROOT
123124

124125
raise NotImplementedError(

airbyte/cloud/workspaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def get_organization(
267267
"""
268268
try:
269269
info = self._organization_info
270-
except AirbyteError:
270+
except (AirbyteError, NotImplementedError):
271271
if raise_on_error:
272272
raise
273273
return None

0 commit comments

Comments
 (0)