Skip to content

Commit 4e89881

Browse files
committed
Merge branch 'tim/sdk-configures-edge' of github.com:groundlight/python-sdk into tim/sdk-configures-edge
2 parents e7c7e96 + dde221c commit 4e89881

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/groundlight/edge/api.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from groundlight.client import EdgeNotAvailableError
66
from groundlight.edge.config import EdgeEndpointConfig
77

8-
98
_EDGE_METHOD_UNAVAILABLE_HINT = (
109
"Make sure the client is pointed at a running edge endpoint "
1110
"(via GROUNDLIGHT_ENDPOINT env var or the endpoint= constructor arg)."
@@ -31,10 +30,14 @@ def _request(self, method: str, path: str, **kwargs) -> requests.Response:
3130
response.raise_for_status()
3231
except requests.exceptions.HTTPError as e:
3332
if e.response is not None and e.response.status_code == 404:
34-
raise EdgeNotAvailableError(f"Edge method not available at {url}. {_EDGE_METHOD_UNAVAILABLE_HINT}") from e
33+
raise EdgeNotAvailableError(
34+
f"Edge method not available at {url}. {_EDGE_METHOD_UNAVAILABLE_HINT}"
35+
) from e
3536
raise
3637
except requests.exceptions.ConnectionError as e:
37-
raise EdgeNotAvailableError(f"Could not connect to {self._base_url()}. {_EDGE_METHOD_UNAVAILABLE_HINT}") from e
38+
raise EdgeNotAvailableError(
39+
f"Could not connect to {self._base_url()}. {_EDGE_METHOD_UNAVAILABLE_HINT}"
40+
) from e
3841
return response
3942

4043
def get_config(self) -> EdgeEndpointConfig:

0 commit comments

Comments
 (0)