internal 0.1.31__py3-none-any.whl → 0.1.33__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 internal might be problematic. Click here for more details.
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from fastapi import status
|
|
2
|
+
from .base_exception import InternalBaseException
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class BadGatewayException(InternalBaseException):
|
|
6
|
+
code = "error_bad_gateway"
|
|
7
|
+
message = "Bad gateway"
|
|
8
|
+
|
|
9
|
+
def __init__(self, message: str = None, **kwargs):
|
|
10
|
+
_message = message or self.message
|
|
11
|
+
super().__init__(status.HTTP_502_BAD_GATEWAY, self.code, _message, **kwargs)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GatewayTimeoutException(InternalBaseException):
|
|
15
|
+
code = "error_gateway_timeout"
|
|
16
|
+
message = "Gateway timeout"
|
|
17
|
+
|
|
18
|
+
def __init__(self, message: str = None, **kwargs):
|
|
19
|
+
_message = message or self.message
|
|
20
|
+
super().__init__(status.HTTP_504_GATEWAY_TIMEOUT, self.code, _message, **kwargs)
|
internal/http/responses.py
CHANGED
|
@@ -22,6 +22,9 @@ async def async_response(data=None, message=None, code=None, page_no=None, total
|
|
|
22
22
|
data[field_name] = data[field_name]["id"]
|
|
23
23
|
return data
|
|
24
24
|
|
|
25
|
+
if isinstance(data, JSONResponse):
|
|
26
|
+
return data
|
|
27
|
+
|
|
25
28
|
ret = {}
|
|
26
29
|
if isinstance(data, list):
|
|
27
30
|
data = [_serialize(d) for d in data]
|
|
@@ -5,19 +5,20 @@ internal/const.py,sha256=U1S9r7bjtHgad2oYQoHO19s8D4V0WDUG-L-haV4UaIw,1025
|
|
|
5
5
|
internal/database.py,sha256=MyRLlb0W8FB8Odq0UQpN3R7OD3yUPWgJXsZRuDWQC_w,1010
|
|
6
6
|
internal/exception/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
internal/exception/base_exception.py,sha256=U0ZXx1FOXydAnQQImznkeAdsKVC_YaukPWvJdWqEBfg,363
|
|
8
|
+
internal/exception/internal_exception.py,sha256=Q1h8GmaiSCNd050y28TVhrZXp-HWGaJqKZ_duW8pxrk,683
|
|
8
9
|
internal/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
10
|
internal/ext/amazon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
11
|
internal/ext/amazon/aws/__init__.py,sha256=2YFjb-rHG1JaZGZiZffYDesgTAJjDshOqQbswOYzhP8,834
|
|
11
12
|
internal/ext/amazon/aws/const.py,sha256=l4WMg5bKWujwOKABBkCO2zclNg3abnYOfbhD7DG8GsA,109
|
|
12
13
|
internal/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
14
|
internal/http/requests.py,sha256=1LMKuUb1RU0tpJHektFhRkvGULyZg-XbIh1pmTS4vdY,492
|
|
14
|
-
internal/http/responses.py,sha256=
|
|
15
|
+
internal/http/responses.py,sha256=DADdRfyk8RerhGLVzqoy5OT2SeAX-po2X-aMqEvj_Eg,1498
|
|
15
16
|
internal/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
17
|
internal/interface/base_interface.py,sha256=R5MmO5oa5-ORPV_adkegLVCwsVio2zFOuQFGiby3khs,340
|
|
17
18
|
internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
19
|
internal/model/base_model.py,sha256=gNbixWuGiK8Tbe78wHuLneZ8p3fwMwQRKurBDrGoh6s,1874
|
|
19
20
|
internal/model/operate.py,sha256=3mOs7eQ2CPnCB6i6UQBOp8VdTPmVnayaUFqUEDOKoTY,1493
|
|
20
21
|
internal/utils.py,sha256=0SubS0iUhDvjSX1F4TykasA5-enYJzt2VH-f7_0BnjI,1509
|
|
21
|
-
internal-0.1.
|
|
22
|
-
internal-0.1.
|
|
23
|
-
internal-0.1.
|
|
22
|
+
internal-0.1.33.dist-info/METADATA,sha256=zYWc-qGixejnD_atwf5x73hkGL1ISTxx4Pk_50LYHlg,625
|
|
23
|
+
internal-0.1.33.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
24
|
+
internal-0.1.33.dist-info/RECORD,,
|
|
File without changes
|