cecil 0.0.12__py3-none-any.whl → 0.0.13__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.

Potentially problematic release.


This version of cecil might be problematic. Click here for more details.

cecil/client.py CHANGED
@@ -21,7 +21,7 @@ from .models import (
21
21
  )
22
22
 
23
23
  # TODO: find a way to get this version from __about__.py
24
- SDK_VERSION = "0.0.12"
24
+ SDK_VERSION = "0.0.13"
25
25
 
26
26
  # TODO: Documentation (Google style)
27
27
  # TODO: Add HTTP retries
@@ -136,10 +136,11 @@ class Client:
136
136
  except requests.exceptions.ConnectionError as err:
137
137
  raise ValueError("Connection error") from err
138
138
  except requests.exceptions.HTTPError as err:
139
- if err.response.status_code == 403:
140
- raise ValueError("Authentication error") from err
141
- else:
142
- raise
139
+ message = f"Request failed with status code {err.response.status_code}"
140
+ if err.response.text != "":
141
+ message += f": {err.response.text}"
142
+
143
+ raise ValueError(message) from err
143
144
 
144
145
  def _get(self, url: str, **kwargs) -> Dict:
145
146
  return self._request(method="get", url=url, **kwargs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cecil
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: Python SDK for Cecil Earth
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE.txt
@@ -0,0 +1,7 @@
1
+ cecil/__init__.py,sha256=MF64bwUCd4sm3dvcxZnkb4ujHtxT_KeuXdD0nVieEt4,27
2
+ cecil/client.py,sha256=wgEYWuTZeJv81oiCoNU0rUrDlwnXI1sQFiLLa51BvyI,5070
3
+ cecil/models.py,sha256=6p9AedCDdkK-ptK2r5pc9AKG8rgZHw-YYDvRgXPAQqI,2544
4
+ cecil-0.0.13.dist-info/METADATA,sha256=6Py3ar6ZlMOwaX3zo4TScat1uvcZk2jSECFc8CXmBZM,2677
5
+ cecil-0.0.13.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
6
+ cecil-0.0.13.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
7
+ cecil-0.0.13.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- cecil/__init__.py,sha256=MF64bwUCd4sm3dvcxZnkb4ujHtxT_KeuXdD0nVieEt4,27
2
- cecil/client.py,sha256=Lnu8eUK9e7tmq8Cb_vjfAagxfhvSQ6aRBNdksV5Ji_c,5000
3
- cecil/models.py,sha256=6p9AedCDdkK-ptK2r5pc9AKG8rgZHw-YYDvRgXPAQqI,2544
4
- cecil-0.0.12.dist-info/METADATA,sha256=03bTqwBAreI1zIGEXU7iCeuaIW9hkTVul673Shn6gAA,2677
5
- cecil-0.0.12.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
6
- cecil-0.0.12.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
7
- cecil-0.0.12.dist-info/RECORD,,
File without changes