Skip to content

Commit

Permalink
clean up exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Oct 6, 2024
1 parent f2ce489 commit 5f501f8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions airbyte/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ def _resolve_source_job(
source_executable = Path(source)
if not source_executable.exists():
raise PyAirbyteInputError(
message=f"Source executable not found: {source}",
message="Source executable not found.",
context={
"source": source,
},
)
source_obj = get_source(
name=source_executable.stem,
Expand Down Expand Up @@ -186,7 +189,10 @@ def _resolve_destination_job(
destination_executable = Path(destination)
if not destination_executable.exists():
raise PyAirbyteInputError(
message=f"Destination executable not found: {destination}",
message="Destination executable not found.",
context={
"destination": destination,
},
)
return get_destination(
name=destination_executable.stem,
Expand Down Expand Up @@ -246,7 +252,10 @@ def validate(
local_executable = Path(connector)
if not local_executable.exists():
raise PyAirbyteInputError(
message=f"Connector executable not found: {connector}",
message="Connector executable not found.",
context={
"connector": connector,
},
)
connector_name = local_executable.stem
else:
Expand Down

0 comments on commit 5f501f8

Please sign in to comment.