Skip to content

Commit 497f73f

Browse files
feat: improve error message for connector directory resolution
Co-Authored-By: Aaron <AJ> Steers <[email protected]>
1 parent 18893d7 commit 497f73f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

airbyte_cdk/cli/airbyte_cdk/_secrets.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@ def fetch(
100100
if not connector_name:
101101
connector_name = connector_directory.name
102102
elif connector_name:
103-
connector_directory = find_connector_root_from_name(connector_name)
103+
try:
104+
connector_directory = find_connector_root_from_name(connector_name)
105+
except FileNotFoundError as e:
106+
raise FileNotFoundError(
107+
f"Could not find connector directory for '{connector_name}'. "
108+
"Please provide the --connector-directory option with the path to the connector. "
109+
"Note: This command requires either running from within a connector directory, "
110+
"being in the airbyte monorepo, or explicitly providing the connector directory path."
111+
) from e
104112
else:
105113
raise ValueError("Either connector_name or connector_directory must be provided.")
106114

0 commit comments

Comments
 (0)