Skip to content

Commit 3a04655

Browse files
committed
fixes
1 parent e0fd91d commit 3a04655

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/uipath_llm_client/settings/llmgateway/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from uipath_llm_client.settings.base import UiPathAPIConfig, UiPathBaseSettings
1010
from uipath_llm_client.settings.llmgateway.utils import LLMGatewayEndpoints
11+
from uipath_llm_client.utils.exceptions import UiPathAPIError
1112

1213

1314
class LLMGatewayBaseSettings(UiPathBaseSettings):
@@ -107,7 +108,8 @@ def get_available_models(self) -> list[dict[str, Any]]:
107108
discovery_url = f"{self.base_url}/{self.org_id}/{self.tenant_id}/{LLMGatewayEndpoints.DISCOVERY_ENDPOINT.value}"
108109
with Client(auth=self.build_auth_pipeline(), headers=self.build_auth_headers()) as client:
109110
response = client.get(discovery_url)
110-
response.raise_for_status()
111+
if response.is_error:
112+
raise UiPathAPIError.from_response(response)
111113
return response.json()
112114

113115
@override

0 commit comments

Comments
 (0)