File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/openapi_python_generator Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22from typing import Optional , Union
33
44import httpx
5- from httpx import ConnectError
5+ from httpx import ConnectError , ConnectTimeout
66from orjson import orjson
77import typer
88from pydantic import ValidationError
@@ -40,9 +40,9 @@ def get_open_api(path: Union[str,Path]) -> OpenAPI:
4040 except FileNotFoundError :
4141 typer .echo (f"File { path } not found. Please make sure to pass the path to the OpenAPI 3.0 specification." )
4242 raise
43- except ConnectError :
43+ except ( ConnectError , ConnectTimeout ) :
4444 typer .echo (f"Could not connect to { path } ." )
45- raise
45+ raise ConnectError ( f"Could not connect to { path } ." )
4646 except ValidationError :
4747 typer .echo (f"File { path } is not a valid OpenAPI 3.0 specification, or there may be a problem with your JSON." )
4848 raise
You can’t perform that action at this time.
0 commit comments