finalsa-common-http-client 0.0.5__tar.gz → 0.0.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
  MIT License
2
2
 
3
- Copyright (c) 2021 Luis Diego Jiménez Delgado
3
+ Copyright (c) 2025 Luis Diego Jiménez Delgado
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: finalsa-common-http-client
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: HTTP client library for common data types used in business applications
5
5
  Project-URL: Homepage, https://github.com/finalsa/finalsa-http-client
6
6
  Project-URL: Documentation, https://github.com/finalsa/finalsa-http-client#readme
@@ -10,7 +10,7 @@ Project-URL: Changelog, https://github.com/finalsa/finalsa-http-client/blob/main
10
10
  Author-email: Luis Jimenez <luis@finalsa.com>
11
11
  License: MIT License
12
12
 
13
- Copyright (c) 2021 Luis Diego Jiménez Delgado
13
+ Copyright (c) 2025 Luis Diego Jiménez Delgado
14
14
 
15
15
  Permission is hereby granted, free of charge, to any person obtaining a copy
16
16
  of this software and associated documentation files (the "Software"), to deal
@@ -81,8 +81,7 @@ class BaseAsyncHttpClient:
81
81
  if "Content-Type" in headers and headers["Content-Type"] == "application/json":
82
82
  data = await response.json()
83
83
  shared.raise_for_response(data, response.status)
84
- else:
85
- raise shared.InternalHttpError(response.status)
84
+ raise shared.InternalHttpError(response.status)
86
85
 
87
86
  async def request(
88
87
  self,
@@ -4,7 +4,6 @@ from collections.abc import Mapping
4
4
  from typing import Any
5
5
 
6
6
  import requests
7
- from finalsa.common.models import BaseDomainException
8
7
 
9
8
  from finalsa.http import _shared as shared
10
9
 
@@ -117,12 +116,7 @@ class BaseSyncHttpClient:
117
116
  except requests.RequestException as e:
118
117
  if e.response is not None and "Content-Type" in e.response.headers and e.response.headers["Content-Type"] == "application/json":
119
118
  data = e.response.json()
120
- if data.get("message") and data.get("name"):
121
- raise BaseDomainException(
122
- message=data.get("message"),
123
- response_code=e.response.status_code,
124
- name=data.get("name")
125
- ) from e
119
+ shared.raise_for_response(data, e.response.status)
126
120
  raise e
127
121
 
128
122
  def get(self, path: str, **kwargs: Any) -> requests.Response:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "finalsa-common-http-client"
3
- version = "0.0.5"
3
+ version = "0.0.6"
4
4
  description = "HTTP client library for common data types used in business applications"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"