meilisearch-python-sdk 7.2.2__py3-none-any.whl → 7.2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- VERSION = "7.2.2"
1
+ VERSION = "7.2.3"
@@ -1,3 +1,5 @@
1
+ import json
2
+
1
3
  from httpx2 import Response
2
4
 
3
5
 
@@ -35,8 +37,13 @@ class MeilisearchApiError(MeilisearchError):
35
37
  self.message = ""
36
38
  self.link = ""
37
39
  self.error_type = ""
40
+ error_json = None
38
41
  if response.content:
39
- error_json = response.json()
42
+ try:
43
+ error_json = response.json()
44
+ except json.JSONDecodeError:
45
+ error_json = None
46
+ if isinstance(error_json, dict):
40
47
  self.message = f"Error message: {error_json.get('message') or ''}"
41
48
  self.code = f"{error_json.get('code') or ''}"
42
49
  self.error_type = f"{error_json.get('type') or ''}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meilisearch-python-sdk
3
- Version: 7.2.2
3
+ Version: 7.2.3
4
4
  Summary: A Python client providing both async and sync support for the Meilisearch API
5
5
  Project-URL: repository, https://github.com/sanders41/meilisearch-python-sdk
6
6
  Project-URL: homepage, https://github.com/sanders41/meilisearch-python-sdk
@@ -3,9 +3,9 @@ meilisearch_python_sdk/_batch.py,sha256=PQyXyERVQwnxIFMthZ6zVqi2ZbQbMBs6TgUPdLbJ
3
3
  meilisearch_python_sdk/_http_requests.py,sha256=81UPpbNIHsEUlaue5Cgn8WZ4M6byVcrzA7lAEkcd10I,7852
4
4
  meilisearch_python_sdk/_task.py,sha256=lQp2n5ZjD8HboEP6Xid0Z275Jcr4GuXwh_LzpVY5LAo,13189
5
5
  meilisearch_python_sdk/_utils.py,sha256=6Yy0tRe6V0kocVmaYb0rO2Hw2GmvEeY_XLY05P5bMq0,4317
6
- meilisearch_python_sdk/_version.py,sha256=yIWYNV-Rk04Dmvd5xWpbFu257um28skyfSH0jyTxGPo,18
6
+ meilisearch_python_sdk/_version.py,sha256=FIS2MIPS0ff2pJkakLh3vmrrmpjt06LAIj0_Uzp8a_E,18
7
7
  meilisearch_python_sdk/decorators.py,sha256=wgznbwCYRc1_nVfQaOgj7DcOMejB9mJIWqltW6CimnY,8836
8
- meilisearch_python_sdk/errors.py,sha256=VZAcq_72l1y1YMe56FOnxpQ9gV3sk8_ceT7FiHs_wYI,3176
8
+ meilisearch_python_sdk/errors.py,sha256=8cJpHJbJR7t6Tyt15yXVUpNYKbfWt2HTKiBCISDIBrA,3352
9
9
  meilisearch_python_sdk/json_handler.py,sha256=lzwiBP4ASjdBiBLQAjp9akbL-9TnaWnu8Ayy380R_s0,2121
10
10
  meilisearch_python_sdk/plugins.py,sha256=ACk07_3ySHnz_clF3IiJRKeAlSGhpyQfn4taqAozIjo,3750
11
11
  meilisearch_python_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -30,7 +30,7 @@ meilisearch_python_sdk/models/settings.py,sha256=lc0YYnqpMF3szWuKWAiGMKJGmqHO6Hz
30
30
  meilisearch_python_sdk/models/task.py,sha256=nDD-S7K-uL4gcYU-tyPstBWcnJi_8MiDwc53GG6i304,1105
31
31
  meilisearch_python_sdk/models/version.py,sha256=ISU-ZHgpXLBFDuMpWWfKdVo9Dq1HcD7s6HFnCiGTF8Y,184
32
32
  meilisearch_python_sdk/models/webhook.py,sha256=zSkEJJdEflinW3_seJTLQ_ZWs4w-pjTD3SS1ZawC32k,455
33
- meilisearch_python_sdk-7.2.2.dist-info/METADATA,sha256=mOcVnrqk1LQPMuWs5tlt5Zx6ZEFd9mTbNENnIyPxcwQ,9597
34
- meilisearch_python_sdk-7.2.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
35
- meilisearch_python_sdk-7.2.2.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
36
- meilisearch_python_sdk-7.2.2.dist-info/RECORD,,
33
+ meilisearch_python_sdk-7.2.3.dist-info/METADATA,sha256=2HxF6rIEcTCw2S77NMx2rw6iTMoAizszeWlxtQWyXxA,9597
34
+ meilisearch_python_sdk-7.2.3.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
35
+ meilisearch_python_sdk-7.2.3.dist-info/licenses/LICENSE,sha256=xVzevI1TrlKfM0plmJ7vfK1Muu0V9n-dGE8RnDrOFlM,1069
36
+ meilisearch_python_sdk-7.2.3.dist-info/RECORD,,