Skip to content

Commit ca95702

Browse files
committed
Fix typing issues
1 parent d8c832a commit ca95702

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

weaviate/util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import httpx
1515
import validators
16-
from requests.exceptions import JSONDecodeError
1716

1817
from weaviate.exceptions import (
1918
SchemaValidationError,
@@ -824,7 +823,7 @@ def _decode_json_response_dict(response: httpx.Response, location: str) -> Optio
824823
try:
825824
json_response = cast(Dict[str, Any], response.json())
826825
return json_response
827-
except JSONDecodeError:
826+
except httpx.DecodingError:
828827
raise ResponseCannotBeDecodedError(location, response)
829828

830829
raise UnexpectedStatusCodeError(location, response)
@@ -840,7 +839,7 @@ def _decode_json_response_list(
840839
try:
841840
json_response = response.json()
842841
return cast(list, json_response)
843-
except JSONDecodeError:
842+
except httpx.DecodingError:
844843
raise ResponseCannotBeDecodedError(location, response)
845844
raise UnexpectedStatusCodeError(location, response)
846845

0 commit comments

Comments
 (0)