vortex-api 2.1.5__tar.gz → 2.1.6__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vortex_api
3
- Version: 2.1.5
3
+ Version: 2.1.6
4
4
  Summary: Vortex APIs to place orders in Rupeezy application
5
5
  Author-email: "Astha Credit & Securities Pvt Ltd." <tech@rupeezy.in>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vortex_api"
7
- version = "2.1.5"
7
+ version = "2.1.6"
8
8
  description = "Vortex APIs to place orders in Rupeezy application"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -0,0 +1 @@
1
+ __version__ = "2.1.6"
@@ -216,7 +216,16 @@ class VortexAPI:
216
216
  response = requests.request(method, url, headers=headers, json=data,params=params)
217
217
  if self.enable_logging:
218
218
  logging.debug(f"Response received from {url} , body: {response.json()}")
219
- response.raise_for_status()
219
+ if not response.ok:
220
+ try:
221
+ error_body = response.json()
222
+ error_message = error_body.get("message", response.text)
223
+ except Exception:
224
+ error_message = response.text
225
+ raise requests.exceptions.HTTPError(
226
+ f"{response.status_code} {response.reason}: {error_message}",
227
+ response=response,
228
+ )
220
229
  return response.json()
221
230
 
222
231
  def _make_unauth_request(self, method: str, endpoint: str, data: dict = None, params: dict = None) -> dict:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vortex_api
3
- Version: 2.1.5
3
+ Version: 2.1.6
4
4
  Summary: Vortex APIs to place orders in Rupeezy application
5
5
  Author-email: "Astha Credit & Securities Pvt Ltd." <tech@rupeezy.in>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = "2.1.5"
File without changes
File without changes
File without changes