maleo-foundation 0.2.5__py3-none-any.whl → 0.2.6__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.
@@ -13,17 +13,17 @@ from maleo_foundation.utils.logging import BaseLogger
13
13
  class BaseExceptions:
14
14
  @staticmethod
15
15
  def authentication_error_handler(request:Request, exc:Exception):
16
- return JSONResponse(content=BaseResponses.Unauthorized(other=str(exc)).model_dump(), status_code=status.HTTP_401_UNAUTHORIZED)
16
+ return JSONResponse(content=BaseResponses.Unauthorized(other=str(exc)).model_dump(mode="json"), status_code=status.HTTP_401_UNAUTHORIZED)
17
17
 
18
18
  @staticmethod
19
19
  async def validation_exception_handler(request:Request, exc:RequestValidationError):
20
- return JSONResponse(content=BaseResponses.ValidationError(other=exc.errors()).model_dump(), status_code=status.HTTP_422_UNPROCESSABLE_ENTITY)
20
+ return JSONResponse(content=BaseResponses.ValidationError(other=exc.errors()).model_dump(mode="json"), status_code=status.HTTP_422_UNPROCESSABLE_ENTITY)
21
21
 
22
22
  @staticmethod
23
23
  async def http_exception_handler(request:Request, exc:StarletteHTTPException):
24
24
  if exc.status_code in BaseResponses.other_responses:
25
- return JSONResponse(content=BaseResponses.other_responses[exc.status_code]["model"]().model_dump(), status_code=exc.status_code)
26
- return JSONResponse(content=BaseResponses.ServerError().model_dump(), status_code=status.HTTP_500_INTERNAL_SERVER_ERROR)
25
+ return JSONResponse(content=BaseResponses.other_responses[exc.status_code]["model"]().model_dump(mode="json"), status_code=exc.status_code)
26
+ return JSONResponse(content=BaseResponses.ServerError().model_dump(mode="json"), status_code=status.HTTP_500_INTERNAL_SERVER_ERROR)
27
27
 
28
28
  @staticmethod
29
29
  def database_exception_handler(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -93,7 +93,7 @@ maleo_foundation/models/transfers/results/service/controllers/__init__.py,sha256
93
93
  maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=wCuFyOTQkuBs2cqjPsWnPy0XIsCfMqGByhrSy57qp7Y,1107
94
94
  maleo_foundation/utils/__init__.py,sha256=SRPEVoqjZoO6W8rtF_Ti8VIangg6Auwm6eHbZMdOthY,520
95
95
  maleo_foundation/utils/controller.py,sha256=ECzPzpw36zBAjKcWcDbUAhIJGbc6UpeypdUUX6ipXBg,6396
96
- maleo_foundation/utils/exceptions.py,sha256=hstsXST24mbJLuDtAfcdC0FxMgH3IkG97A026CvaX-w,4034
96
+ maleo_foundation/utils/exceptions.py,sha256=YKQ2hwVHUFlLAeup9FmCGptGIgdAuxTmTrD8A3gqURA,4078
97
97
  maleo_foundation/utils/extractor.py,sha256=SZXVYDHWGaA-Dd1BUydwF2HHdZqexEielS4CjL0Ceng,814
98
98
  maleo_foundation/utils/logging.py,sha256=W5Fhk_xAXVqSujaY8mv3hRH4wlQSpUn4ReuMoiKcQa4,7759
99
99
  maleo_foundation/utils/mergers.py,sha256=DniUu3Ot4qkYH_YSw4uD1cn9cfirum4S_Opp8fMkQwA,702
@@ -107,7 +107,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
107
107
  maleo_foundation/utils/loaders/credential/google.py,sha256=deksZXT5wPhEsSMHbZ3x05WHXxCjLDt76Ns-1Tmhp7g,948
108
108
  maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
109
109
  maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
110
- maleo_foundation-0.2.5.dist-info/METADATA,sha256=pV3QopFDva0YAQo7fJjcA6x1ndS-EsLiw1Y-ulqSw2A,3418
111
- maleo_foundation-0.2.5.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
112
- maleo_foundation-0.2.5.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
113
- maleo_foundation-0.2.5.dist-info/RECORD,,
110
+ maleo_foundation-0.2.6.dist-info/METADATA,sha256=EXYSeEKvhAUI78D8EMYt4KS7sRUpZ2P-nrMMSnhkmqg,3418
111
+ maleo_foundation-0.2.6.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
112
+ maleo_foundation-0.2.6.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
113
+ maleo_foundation-0.2.6.dist-info/RECORD,,