Skip to content

Commit

Permalink
refactor: Added PolicyHolderNotFound exceptions
Browse files Browse the repository at this point in the history
Added PolicyHolderNotFound exceptions instead of using generic resource exception
  • Loading branch information
mike-pisman committed Sep 27, 2023
1 parent fd2e23c commit 804ad38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/unipoll_api/exceptions/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
class PolicyNotFound(resource.ResourceNotFound):
def __init__(self, policy_id: ResourceID):
super().__init__("Policy", resource_id=policy_id)


# Exception for when a PolicyHolder is not found
class PolicyHolderNotFound(resource.ResourceNotFound):
def __init__(self, policy_holder_id: ResourceID):
super().__init__("PolicyHolder", resource_id=policy_holder_id)

0 comments on commit 804ad38

Please sign in to comment.