Skip to content

Commit c4968b3

Browse files
committed
fix: Return proper error message instead of raising an exception when the directory doesn't exist for the update command.
1 parent 8cf7038 commit c4968b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_python_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def update(self) -> Sequence[GeneratorError]:
123123
"""Update an existing project"""
124124

125125
if not self.package_dir.is_dir():
126-
raise FileNotFoundError()
126+
return [GeneratorError(detail=f"Directory {self.package_dir} not found")]
127127
print(f"Updating {self.package_name}")
128128
shutil.rmtree(self.package_dir)
129129
self._create_package()

0 commit comments

Comments
 (0)