af-fastapi-exceptions 0.0.2__tar.gz → 0.0.3__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: af-fastapi-exceptions
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: Reusable FastAPI base exceptions, ApiMessage, and a unified exception handler
5
5
  License: MIT
6
6
  Author: Allfly
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "af-fastapi-exceptions"
3
- version = "0.0.2"
3
+ version = "0.0.3"
4
4
  description = "Reusable FastAPI base exceptions, ApiMessage, and a unified exception handler"
5
5
  authors = ["Allfly <engineering@allfly.io>"]
6
6
  license = "MIT"
@@ -45,6 +45,9 @@ class EntityNotFoundError(ServiceError):
45
45
  status_code = status.HTTP_404_NOT_FOUND
46
46
  super().__init__(message, status_code)
47
47
 
48
+ class EntityNotFoundWarning(ServiceWarning):
49
+ def __init__(self, message="Entity not found"):
50
+ super().__init__(message, status.HTTP_404_NOT_FOUND)
48
51
 
49
52
  class ResourceConflictError(ServiceError):
50
53
  def __init__(self, message="Request creates a conflict"):
@@ -68,3 +71,4 @@ class DownstreamServiceError(ServiceError):
68
71
  def __init__(self, message="Downstream service error"):
69
72
  status_code = status.HTTP_502_BAD_GATEWAY
70
73
  super().__init__(message, status_code)
74
+