refac: improved error handling

This commit is contained in:
Timothy J. Baek
2024-04-21 17:37:59 -05:00
parent e627b8bf21
commit 760c62739a
2 changed files with 23 additions and 7 deletions

View File

@@ -3,6 +3,10 @@ from enum import Enum
class MESSAGES(str, Enum):
DEFAULT = lambda msg="": f"{msg if msg else ''}"
MODEL_ADDED = lambda model="": f"The model '{model}' has been added successfully."
MODEL_DELETED = (
lambda model="": f"The model '{model}' has been deleted successfully."
)
class WEBHOOK_MESSAGES(str, Enum):